diff --git a/scripts/e2e-deps.sh b/scripts/e2e-deps.sh index 4ac9b9272b..dcf976dc40 100755 --- a/scripts/e2e-deps.sh +++ b/scripts/e2e-deps.sh @@ -1,8 +1,18 @@ #!/usr/bin/env bash +# requires the following environment variables: +# - CIRCLE_WORKING_DIRECTORY +# - TERRAFORM_VERSION +# - CIRCLE_GO_BIN +# - GITHUB_USERNAME +# - NGROK_AUTH_TOKEN # Exit immediately if a command returns a non-zero code set -e +if [ -z "${CIRCLE_GO_BIN}" ]; then + CIRCLE_GO_BIN="/home/circleci/go/bin" +fi + echo "Preparing to run e2e tests" if [ ! -f atlantis ]; then echo "atlantis binary not found. exiting...." @@ -16,7 +26,7 @@ cd e2e/ curl -LOk https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip chmod +x terraform -cp terraform /home/circleci/go/bin +cp terraform ${CIRCLE_GO_BIN} # Download ngrok to create a tunnel to expose atlantis server wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v2-stable-linux-amd64.zip -O ngrok-stable-linux-amd64.zip unzip ngrok-stable-linux-amd64.zip