diff --git a/bin/provision_test_vms.sh b/bin/provision_test_vms.sh index 291229de..dfedb144 100755 --- a/bin/provision_test_vms.sh +++ b/bin/provision_test_vms.sh @@ -31,7 +31,7 @@ if [ -n "$TEST_AND_PUBLISH" ]; then install_ansible >>"$TEST_VMS_SETUP_OUTPUT_FILE" 2>&1 # Only attempt to create GCP image in first container, wait for it to be created otherwise: - [ "$CIRCLE_NODE_INDEX" == "0" ] && export CREATE_IMAGE=1 + [ "$CIRCLE_NODE_INDEX" != "0" ] && export CREATE_IMAGE=0 # Provision and configure testing VMs: cd "$SRCDIR/test" # Ensures we generate Terraform state files in the right folder, for later use by integration tests. diff --git a/test/run-integration-tests.sh b/test/run-integration-tests.sh index dbe5fb10..178dcd9a 100755 --- a/test/run-integration-tests.sh +++ b/test/run-integration-tests.sh @@ -36,7 +36,7 @@ KUBERNETES_CNI_VERSION=${KUBERNETES_CNI_VERSION:-0.3.0.1} IMAGE_NAME=${IMAGE_NAME:-"$(echo "$APP-docker$DOCKER_VERSION-k8s$KUBERNETES_VERSION-k8scni$KUBERNETES_CNI_VERSION" | sed -e 's/[\.\_]*//g')"} DISK_NAME_PREFIX=${DISK_NAME_PREFIX:-$NAME} USE_IMAGE=${USE_IMAGE:-1} -CREATE_IMAGE=${CREATE_IMAGE:-} +CREATE_IMAGE=${CREATE_IMAGE:-1} CREATE_IMAGE_TIMEOUT_IN_SECS=${CREATE_IMAGE_TIMEOUT_IN_SECS:-600} # Lifecycle flags: SKIP_CONFIG=${SKIP_CONFIG:-} @@ -142,7 +142,7 @@ function wait_for_image() { # shellcheck disable=SC2155 function create_image() { - if [ -n "$CREATE_IMAGE" ]; then + if [[ "$CREATE_IMAGE" == 1 ]]; then greenly echo "> Creating GCP image $IMAGE_NAME..." local begin_img=$(date +%s) local num_hosts=1