Change CircleCI config to 2.0 version
Environment variables are moved out to a script, because CircleCI 2.0 does not support expansion of '$foo' in 'env' section.
This commit is contained in:
1 parent
fc77e33d1d
commit
8620d0ae4f
6 files changed
+76
-67
No files matched your search
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
source "$SRCDIR/bin/circle-env"
|
||||
cd "$SRCDIR/test"
|
||||
./run-integration-tests.sh destroy
|
||||
@@ -0,0 +1,12 @@
|
||||
# Set environment variables here because CircleCI can't expand $FOO in 'env' section
|
||||
|
||||
export PATH="$PATH:$HOME/.local/bin:/opt/google-cloud-sdk/bin"
|
||||
export CLOUDSDK_CORE_DISABLE_PROMPTS=1
|
||||
# Base name of VMs for integration tests:
|
||||
export NAME=test-$CIRCLE_BUILD_NUM-$CIRCLE_NODE_INDEX
|
||||
export TEST_VMS_SETUP_OUTPUT_FILE=$CIRCLE_ARTIFACTS/test_vms_setup_output.txt
|
||||
export TEST_VMS_PROV_AND_CONF_LOCK_FILE=$CIRCLE_ARTIFACTS/test_vms_provisioned_and_configured.txt
|
||||
export TEST_VMS_READY_LOCK_FILE=$CIRCLE_ARTIFACTS/test_vms_ready.txt
|
||||
# Google Cloud Platorm images for integration tests:
|
||||
export USE_IMAGE=1
|
||||
export DISK_NAME_PREFIX=test-$CIRCLE_BUILD_NUM-0
|
||||
@@ -16,6 +16,8 @@ source "$(dirname "$0")/wait_for.sh"
|
||||
exit 1
|
||||
}
|
||||
|
||||
source "$SRCDIR/bin/circle-env"
|
||||
|
||||
# Provisioning from image typically take 90 seconds,
|
||||
# but if we are creating a GCP image, it can take more than 10 minutes:
|
||||
wait_for 900 "$TEST_VMS_PROV_AND_CONF_LOCK_FILE"
|
||||
|
||||
@@ -9,6 +9,8 @@ source "$(dirname "$0")/wait_for.sh"
|
||||
exit 1
|
||||
}
|
||||
|
||||
source "$SRCDIR/bin/circle-env"
|
||||
|
||||
# Provisioning from image typically take 90 seconds,
|
||||
# but if we are creating a GCP image, it can take more than 10 minutes:
|
||||
wait_for 900 "$TEST_VMS_READY_LOCK_FILE"
|
||||
|
||||
@@ -18,7 +18,6 @@ function install_ansible() {
|
||||
sudo apt-get install -qq -y python-pip python-dev libffi-dev libssl-dev \
|
||||
&& pip install --user -U setuptools cffi \
|
||||
&& pip install --user ansible
|
||||
export PATH="$PATH:$HOME/.local/bin"
|
||||
}
|
||||
|
||||
[ -n "$SECRET_KEY" ] || {
|
||||
@@ -26,6 +25,8 @@ function install_ansible() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
source "$SRCDIR/bin/circle-env"
|
||||
|
||||
install_terraform >>"$TEST_VMS_SETUP_OUTPUT_FILE" 2>&1
|
||||
install_ansible >>"$TEST_VMS_SETUP_OUTPUT_FILE" 2>&1
|
||||
|
||||
|
||||
Reference in new issue
Block a user