From b4e235a2b4b5e3fdb6ad797a4e0dd3c45f9403ec Mon Sep 17 00:00:00 2001 From: s-paquett Date: Wed, 21 Aug 2019 22:52:48 -0700 Subject: [PATCH 1/3] -> API tier branches have different names --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 10e94b4e..0e985cee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ commands: command: | TIER=DEV if [[ ${CIRCLE_BRANCH} =~ (prod|uat|test).* ]]; then - TIER=$(awk -F- '{print toupper($3)}' \<<< ${CIRCLE_BRANCH}) + TIER=$(awk -F[\-_] '{print toupper($1)}' \<<< ${CIRCLE_BRANCH}) fi echo "export TIER=${TIER}" >> $BASH_ENV echo "Tier was identified as ${TIER} for branch ${CIRCLE_BRANCH}" From 5985f8851708f8896ef8faa2ac1d38ec833d277e Mon Sep 17 00:00:00 2001 From: s-paquett Date: Wed, 21 Aug 2019 23:03:41 -0700 Subject: [PATCH 2/3] -> Don't need those files for the API --- shell/gcloud-pull-staging-files.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/shell/gcloud-pull-staging-files.sh b/shell/gcloud-pull-staging-files.sh index 8ec4ba75..a6546bfd 100644 --- a/shell/gcloud-pull-staging-files.sh +++ b/shell/gcloud-pull-staging-files.sh @@ -14,8 +14,6 @@ gsutil cp "gs://${DEPLOYMENT_BUCKET}/${SERVICE_ACCOUNT_BLACKLIST_JSON_FILE}" ./ gsutil cp "gs://${DEPLOYMENT_BUCKET}/${GOOGLE_ORG_WHITELIST_JSON_FILE}" ./ gsutil cp "gs://${DEPLOYMENT_BUCKET}/${MANAGED_SERVICE_ACCOUNTS_JSON_FILE}" ./ -gsutil cp "gs://${DEPLOYMENT_BUCKET}/${STATIC_COMMIT_CHECK_FILE}" ./ - # Pack staged files for caching echo "Packing JSON and text files for caching into deployment..." cp --verbose *.json ./json From f64d060e25217f86c3272fdb56a2a959aa71a8ea Mon Sep 17 00:00:00 2001 From: s-paquett Date: Wed, 21 Aug 2019 23:09:00 -0700 Subject: [PATCH 3/3] -> Don't need those files for the API --- shell/gcloud-pull-staging-files.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/shell/gcloud-pull-staging-files.sh b/shell/gcloud-pull-staging-files.sh index a6546bfd..b4698611 100644 --- a/shell/gcloud-pull-staging-files.sh +++ b/shell/gcloud-pull-staging-files.sh @@ -2,7 +2,6 @@ mkdir ./json mkdir ./txt gsutil cp "gs://${DEPLOYMENT_BUCKET}/${ENV_FILE}" ./.env -gsutil cp "gs://${DEPLOYMENT_BUCKET}/${WEB_CLIENT_SECRETS_FILE}" ./client_secrets.json gsutil cp "gs://${DEPLOYMENT_BUCKET}/${API_RUNTIME_SA_KEY}" ./privatekey.json gsutil cp "gs://${DEPLOYMENT_BUCKET}/${OPEN_API_YAML}" ./openapi-appengine.yaml gsutil cp "gs://${DEPLOYMENT_BUCKET}/${OPEN_API_YAML}" ./apiv4/api.yaml