Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipelining of tests and upgrades #16

Merged
merged 25 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bosh/opsfiles/releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- path: /releases/name=app-autoscaler?
type: replace
value:
name: app-autoscaler
version: 12.2.1
url: https://storage.googleapis.com/app-autoscaler-releases/releases/app-autoscaler-v12.2.1.tgz
sha1: sha256:39a072d429a17efd27f3b819eff29efa043dc3ffe3f0676fd7be192477ac4c71
19 changes: 19 additions & 0 deletions ci/acceptance-tests-debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
platform: linux

image_resource:
type: registry-image
source:
aws_access_key_id: ((ecr_aws_key))
aws_secret_access_key: ((ecr_aws_secret))
repository: general-task
aws_region: us-gov-west-1
tag: latest

inputs:
- name: autoscaler-manifests-test #TODO: switch this back to autoscaler-manifests
outputs:
- name: acceptance-tests-output #Placeholder, not sure if needed yet

run:
path: autoscaler-manifests-test/ci/acceptance-tests.sh #TODO: switch this back to autoscaler-manifests
62 changes: 62 additions & 0 deletions ci/acceptance-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash

set -eu
echo "###################################"
echo "This is the installed go version: $(go version)"
echo "This is the installed cf cli version: $(cf -v)"
echo "This is the ACCEPTANCE_TESTS_VERSION version: ${ACCEPTANCE_TESTS_VERSION}"
echo "###################################"

# Get the tarball with the test
wget -O app-autoscaler-acceptance-tests.tgz https://github.com/cloudfoundry/app-autoscaler-release/releases/download/v${ACCEPTANCE_TESTS_VERSION}/app-autoscaler-acceptance-tests-v${ACCEPTANCE_TESTS_VERSION}.tgz
tar -xzf app-autoscaler-acceptance-tests.tgz

cd acceptance

# Set the config file needed for the acceptance tests
echo "###################################"
echo "Writing config file for acceptance tests to acceptance/integration_config.json, do not ever print this out into concourse logs!"
echo "###################################"

cat > integration_config.json <<EOF
{
"api": "${CF_API}",
"admin_user": "${CF_ADMIN_USER}",
"admin_password": "${CF_ADMIN_PASSWORD}",
"apps_domain": "${CF_APPS_DOMAIN}",
"skip_ssl_validation": true,
"use_http": false,

"service_name": "app-autoscaler",
"service_plan": "autoscaler-free-plan",
"aggregate_interval": 120,
"health_endpoints_basic_auth_enabled": true,

"autoscaler_api": "${AUTOSCALER_API}",
"service_offering_enabled": true
}
EOF
export CONFIG=$PWD/integration_config.json

# Set GINKGO_BINARY since its provided in the tarball, omit this to have it built at runtime
export GINKGO_BINARY=$PWD/ginkgo_v2_linux_amd64


# Run the actual test, pick one: {broker, api, app}
echo "###################################"
echo "Running ${COMPONENT_TO_TEST} test..."
echo "###################################"
./bin/test ${COMPONENT_TO_TEST}



# Perform the cleanup (drops any created org that is named ASATS*)
echo "###################################"
echo "Logging in and running cleanup.sh..."
echo "###################################"
cf login -a ${CF_API} -u ${CF_ADMIN_USER} -p "${CF_ADMIN_PASSWORD}" -o cloud-gov -s services
./cleanup.sh

echo "###################################"
echo "~FIN~"
echo "###################################"
19 changes: 19 additions & 0 deletions ci/acceptance-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
platform: linux

image_resource:
type: registry-image
source:
aws_access_key_id: ((ecr_aws_key))
aws_secret_access_key: ((ecr_aws_secret))
repository: general-task
aws_region: us-gov-west-1
tag: latest

inputs:
- name: autoscaler-manifests
outputs:
- name: acceptance-tests-output #Placeholder, not sure if needed yet

run:
path: autoscaler-manifests/ci/acceptance-tests.sh
Loading
Loading