From 5f4f10ea074bcf1cd1e3bc29f9ffdc4906950e8b Mon Sep 17 00:00:00 2001 From: pgvishnuram <81585115+pgvishnuram@users.noreply.github.com> Date: Thu, 13 May 2021 23:49:15 +0530 Subject: [PATCH] circleci build enhancements (#57) --- .circleci/config.yml | 21 ++++++++++++--------- examples/from_scratch/main.tf | 4 ++++ pipeline/run_terraform.sh | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 434202f..b3c5d29 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -110,15 +110,18 @@ workflows: - terraform_lint: context: - slack - #- terraform_apply: - # requires: - # - terraform_lint - # context: - # - slack - #- terraform_destroy: - # requires: - # - terraform_apply - # context: slack + - terraform_apply: + requires: + - terraform_lint + context: + - slack + - gcp-dev + - terraform_destroy: + requires: + - terraform_apply + context: + - slack + - gcp-dev #- git_tag: # context: # - github-repo diff --git a/examples/from_scratch/main.tf b/examples/from_scratch/main.tf index 996626b..f86de0c 100644 --- a/examples/from_scratch/main.tf +++ b/examples/from_scratch/main.tf @@ -4,6 +4,10 @@ variable "zonal" { default = false } +variable "spotinist_token" { + default = "12345" +} + module "astronomer_gcp" { source = "../.." deployment_id = var.deployment_id diff --git a/pipeline/run_terraform.sh b/pipeline/run_terraform.sh index b948c07..6b5f66a 100755 --- a/pipeline/run_terraform.sh +++ b/pipeline/run_terraform.sh @@ -4,7 +4,7 @@ TERRAFORM="${TERRAFORM:-terraform-0.13.7}" "${TERRAFORM}" -v -echo "$GOOGLE_CREDENTIAL_FILE_CONTENT" > /tmp/account.json +echo "$GCP_TOKEN" > /tmp/account.json set -xe