From 6337972c8aa763e1990972eab89590e3f3cebf47 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Sun, 8 Oct 2017 21:05:29 +0000 Subject: [PATCH] Don't need to pipe background commands to file in Circle 2.0 --- bin/circle-env | 1 - bin/circle-test-pre | 4 ++-- bin/provision_test_vms.sh | 8 ++++---- bin/wait_for.sh | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/circle-env b/bin/circle-env index d7b95b5e..aa716bc0 100644 --- a/bin/circle-env +++ b/bin/circle-env @@ -4,7 +4,6 @@ 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: diff --git a/bin/circle-test-pre b/bin/circle-test-pre index e3ae7649..040f8566 100755 --- a/bin/circle-test-pre +++ b/bin/circle-test-pre @@ -24,6 +24,6 @@ wait_for 900 "$TEST_VMS_PROV_AND_CONF_LOCK_FILE" # Upload built binaries to testing VMs: cd "$SRCDIR/test" # Ensures we generate Terraform state files in the right folder, for later use by integration tests. -./run-integration-tests.sh setup >>"$TEST_VMS_SETUP_OUTPUT_FILE" 2>&1 +./run-integration-tests.sh setup echo "OK" >"$TEST_VMS_READY_LOCK_FILE" -echo "Test VMs now ready. $(date)." >>"$TEST_VMS_SETUP_OUTPUT_FILE" +echo "Test VMs now ready. $(date)." diff --git a/bin/provision_test_vms.sh b/bin/provision_test_vms.sh index 2c0c3755..b42a32cd 100755 --- a/bin/provision_test_vms.sh +++ b/bin/provision_test_vms.sh @@ -27,14 +27,14 @@ function install_ansible() { source "$SRCDIR/bin/circle-env" -install_terraform >>"$TEST_VMS_SETUP_OUTPUT_FILE" 2>&1 -install_ansible >>"$TEST_VMS_SETUP_OUTPUT_FILE" 2>&1 +install_terraform +install_ansible # Only attempt to create GCP image in first container, wait for it to be created otherwise: [ "$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. -./run-integration-tests.sh configure >>"$TEST_VMS_SETUP_OUTPUT_FILE" 2>&1 +./run-integration-tests.sh configure echo "OK" >"$TEST_VMS_PROV_AND_CONF_LOCK_FILE" -echo "Test VMs now provisioned and configured. $(date)." >>"$TEST_VMS_SETUP_OUTPUT_FILE" +echo "Test VMs now provisioned and configured. $(date)." diff --git a/bin/wait_for.sh b/bin/wait_for.sh index d9148cb1..39bb669b 100755 --- a/bin/wait_for.sh +++ b/bin/wait_for.sh @@ -16,6 +16,6 @@ wait_for() { if ! ((i % 10)); then echo "[$i seconds]: Waiting for $lock_file to be created..."; fi sleep 1 done - echo "Timed out waiting for test VMs to be ready. See details in: $TEST_VMS_SETUP_OUTPUT_FILE" >&2 + echo "Timed out waiting for test VMs to be ready." >&2 return 1 }