diff --git a/ci/build-manifest.sh b/ci/build-manifest.sh old mode 100755 new mode 100644 index b9cb7af..c06a0e6 --- a/ci/build-manifest.sh +++ b/ci/build-manifest.sh @@ -12,11 +12,10 @@ TERRAFORM="${TERRAFORM_BIN:-terraform}" # Append environment variables to manifest cat << EOF >> built/manifest.yml -env: - DB_URL: `${TERRAFORM} output -raw -state=$STATE_FILE rds_internal_rds_host` - DB_PORT: `${TERRAFORM} output -raw -state=$STATE_FILE rds_internal_rds_port` - S3_SNAPSHOT_BUCKET: `${TERRAFORM} output -raw -state=$STATE_FILE s3_snapshots_bucket_id` - ENABLE_FUNCTIONS: true + DB_URL: `${TERRAFORM} output -raw -state=$STATE_FILE rds_internal_rds_host` + DB_PORT: `${TERRAFORM} output -raw -state=$STATE_FILE rds_internal_rds_port` + S3_SNAPSHOT_BUCKET: `${TERRAFORM} output -raw -state=$STATE_FILE s3_snapshots_bucket_id` + ENABLE_FUNCTIONS: true EOF # Build secrets for merging into templates diff --git a/ci/run-smoke-test-rotate-creds.sh b/ci/run-smoke-test-rotate-creds.sh old mode 100755 new mode 100644 index 683a0ad..a92b018 --- a/ci/run-smoke-test-rotate-creds.sh +++ b/ci/run-smoke-test-rotate-creds.sh @@ -23,7 +23,7 @@ cf delete-service -f "rds-smoke-tests-db-rotate-creds-$SERVICE_PLAN" # change into the directory and push the app without starting it. pushd aws-db-test/databases/aws-rds -cf push "smoke-tests-db-rotate-creds-${SERVICE_PLAN}" -f manifest.yml --no-start +cf push "smoke-tests-db-rotate-creds-${SERVICE_PLAN}" -f manifest.yml --var rds-service="rds-smoke-tests-db-rotate-creds-$SERVICE_PLAN" --no-start # set some variables that it needs cf set-env "smoke-tests-db-rotate-creds-${SERVICE_PLAN}" DB_TYPE "${SERVICE_PLAN}" @@ -43,7 +43,7 @@ while true; do done # wait for the app to start. if the app starts, it's passed the smoke test. -cf push "smoke-tests-db-rotate-creds-${SERVICE_PLAN}" +cf push "smoke-tests-db-rotate-creds-${SERVICE_PLAN}" --var rds-service="rds-smoke-tests-db-rotate-creds-$SERVICE_PLAN" # Rotate creds cf update-service "rds-smoke-tests-db-rotate-creds-$SERVICE_PLAN" -c '{"rotate_credentials": true}' @@ -69,6 +69,7 @@ cf restage "smoke-tests-db-rotate-creds-${SERVICE_PLAN}" # Restart app - if it succeeds, then smoke tests have passed with new credentials cf restart "smoke-tests-db-rotate-creds-${SERVICE_PLAN}" + # Clean up app and service cf delete -f "smoke-tests-db-rotate-creds-$SERVICE_PLAN" cf delete-service -f "rds-smoke-tests-db-rotate-creds-$SERVICE_PLAN" diff --git a/ci/run-smoke-tests-db-updates.sh b/ci/run-smoke-tests-db-updates.sh old mode 100755 new mode 100644 index 6c8f3e3..239a8f1 --- a/ci/run-smoke-tests-db-updates.sh +++ b/ci/run-smoke-tests-db-updates.sh @@ -24,7 +24,7 @@ cf delete-service -f "rds-smoke-tests-db-update-$SERVICE_PLAN" # change into the directory and push the app without starting it. pushd aws-db-test/databases/aws-rds -cf push "smoke-tests-db-update-${SERVICE_PLAN}" -f manifest.yml --no-start +cf push "smoke-tests-db-update-${SERVICE_PLAN}" -f manifest.yml --var rds-service="rds-smoke-tests-update-$SERVICE_PLAN" --no-start # set some variables that it needs cf set-env "smoke-tests-db-update-${SERVICE_PLAN}" DB_TYPE "${SERVICE_PLAN}" @@ -50,7 +50,7 @@ while true; do done # wait for the app to start. if the app starts, it's passed the smoke test. -cf push "smoke-tests-db-update-${SERVICE_PLAN}" +cf push "smoke-tests-db-update-${SERVICE_PLAN}" --var rds-service="rds-smoke-tests-db-update-$SERVICE_PLAN" # Update service cf update-service "rds-smoke-tests-db-update-$SERVICE_PLAN" -p "$NEW_SERVICE_PLAN" diff --git a/ci/run-smoke-tests-db-version.sh b/ci/run-smoke-tests-db-version.sh old mode 100755 new mode 100644 index 9596be8..981582c --- a/ci/run-smoke-tests-db-version.sh +++ b/ci/run-smoke-tests-db-version.sh @@ -23,7 +23,7 @@ cf delete-service -f "rds-smoke-tests-db-version-$SERVICE_PLAN" # change into the directory and push the app without starting it. pushd aws-db-test/databases/aws-rds -cf push "smoke-tests-db-version-${SERVICE_PLAN}" -f manifest.yml --no-start +cf push "smoke-tests-db-version-${SERVICE_PLAN}" -f manifest.yml --var rds-service="rds-smoke-tests-db-version-$SERVICE_PLAN" --no-start # set some variables that it needs cf set-env "smoke-tests-db-version-${SERVICE_PLAN}" DB_TYPE "${SERVICE_PLAN}" @@ -49,7 +49,7 @@ while true; do done # wait for the app to start. if the app starts, it's passed the smoke test. -cf push "smoke-tests-db-version-${SERVICE_PLAN}" +cf push "smoke-tests-db-version-${SERVICE_PLAN}" --var rds-service="rds-smoke-tests-db-version-$SERVICE_PLAN" # Clean up app and service cf delete -f "smoke-tests-db-version-$SERVICE_PLAN" diff --git a/ci/run-smoke-tests-update-storage.sh b/ci/run-smoke-tests-update-storage.sh old mode 100755 new mode 100644 index 57ecfb4..abb7a89 --- a/ci/run-smoke-tests-update-storage.sh +++ b/ci/run-smoke-tests-update-storage.sh @@ -24,7 +24,7 @@ cf delete-service -f "rds-smoke-tests-db-update-storage-$SERVICE_PLAN" # change into the directory and push the app without starting it. pushd aws-db-test/databases/aws-rds -cf push "smoke-tests-db-update-storage-${SERVICE_PLAN}" -f manifest.yml --no-start +cf push "smoke-tests-db-update-storage-${SERVICE_PLAN}" -f manifest.yml --var rds-service="rds-smoke-tests-db-update-storage-$SERVICE_PLAN" --no-start # set some variables that it needs cf set-env "smoke-tests-db-update-storage-${SERVICE_PLAN}" DB_TYPE "${SERVICE_PLAN}" @@ -50,7 +50,7 @@ while true; do done # wait for the app to start. if the app starts, it's passed the smoke test. -cf push "smoke-tests-db-update-storage-${SERVICE_PLAN}" +cf push "smoke-tests-db-update-storage-${SERVICE_PLAN}" --var rds-service="rds-smoke-tests-db-update-storage-$SERVICE_PLAN" # Update storage size cf update-service "rds-smoke-tests-db-update-storage-$SERVICE_PLAN" -c '{"storage": 25}' diff --git a/ci/run-smoke-tests.sh b/ci/run-smoke-tests.sh old mode 100755 new mode 100644 index 4ffcc3a..f2249b2 --- a/ci/run-smoke-tests.sh +++ b/ci/run-smoke-tests.sh @@ -11,7 +11,7 @@ cf delete-service -f "rds-smoke-tests-$SERVICE_PLAN" # change into the directory and push the app without starting it. pushd aws-db-test/databases/aws-rds -cf push "smoke-tests-${SERVICE_PLAN}" -f manifest.yml --no-start +cf push "smoke-tests-${SERVICE_PLAN}" -f manifest.yml --var rds-service="rds-smoke-tests-$SERVICE_PLAN" --no-start # set some variables that it needs cf set-env "smoke-tests-${SERVICE_PLAN}" DB_TYPE "${SERVICE_PLAN}" @@ -37,7 +37,7 @@ while true; do done # wait for the app to start. if the app starts, it's passed the smoke test. -cf push "smoke-tests-${SERVICE_PLAN}" +cf push "smoke-tests-${SERVICE_PLAN}" --var rds-service="rds-smoke-tests-$SERVICE_PLAN" # Clean up app and service cf delete -f "smoke-tests-$SERVICE_PLAN"