File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 @echo " Set CIRCLECI environment variables\n"
1111 export AWS_ACCESS_KEY_ID=$(shell aws secretsmanager get-secret-value --region ${region} --secret-id=ci-user-aws-keys${randomSeed} | jq -r '.SecretString'| jq -r .access_key_id)
1212 export AWS_SECRET_ACCESS_KEY=$(shell aws secretsmanager get-secret-value --region ${region} --secret-id=ci-user-aws-keys${randomSeed} | jq -r '.SecretString'| jq -r .secret_key)
13+ curl -X POST --header " Content-Type: application/json" -d ' {"name":"CIRCLECI_API_KEY", "value":"${CIRCLECI_API_KEY}"}' https://circleci.com/api/v1.1/project/github/${GITHUB_ORG} /${GITHUB_REPO} /envvar? circle-token=${CIRCLECI_API_KEY}
1314 curl -X POST --header " Content-Type: application/json" -d ' {"name":"AWS_ACCESS_KEY_ID", "value":"${AWS_ACCESS_KEY_ID}"}' https://circleci.com/api/v1.1/project/github/${GITHUB_ORG} /${GITHUB_REPO} /envvar? circle-token=${CIRCLECI_API_KEY}
1415 curl -X POST --header " Content-Type: application/json" -d ' {"name":"AWS_SECRET_ACCESS_KEY", "value":"${AWS_SECRET_ACCESS_KEY}"}' https://circleci.com/api/v1.1/project/github/${GITHUB_ORG} /${GITHUB_REPO} /envvar? circle-token=${CIRCLECI_API_KEY}
1516 @echo " \nFollow CIRCLECI project"
@@ -22,4 +23,3 @@ summary:
2223 @echo " - Deployment Pipeline URL: https://app.circleci.com/pipelines/github/${GITHUB_ORG} /${GITHUB_REPO} "
2324 @echo $(shell echo ${ENVIRONMENT} | grep prod > /dev/null && echo "- Production Landing Page: ${productionFrontendSubdomain}${productionHostRoot}")
2425 @echo $(shell echo ${ENVIRONMENT} | grep stage > /dev/null && echo "- Staging Landing Page: ${stagingFrontendSubdomain}${stagingHostRoot}")
25-
Original file line number Diff line number Diff line change 22version : 2.1
33orbs :
44 aws-s3 : circleci/aws-s3@1.0.15
5+ queue : eddiewebb/queue@1.3.0
56
67variables :
78 - &workspace /home/circleci/project
@@ -182,7 +183,7 @@ jobs:
182183 - run :
183184 name : Invalidate Cloudfront
184185 command : |
185- export DIST_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Aliases.Items[?contains(@, '<< parameters.bucket >>') ]].Id | [0]" | tr -d '"')
186+ export DIST_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Aliases.Items[?@== '<< parameters.bucket >>']].Id | [0]" | tr -d '"')
186187 aws cloudfront create-invalidation --distribution-id ${DIST_ID} --paths "/*"
187188
188189workflows :
@@ -220,12 +221,23 @@ workflows:
220221 # branches:
221222 # only: # only branches matching the below regex filters will run
222223 # - /^master$/
224+
225+ - wait_for_approval :
226+ type : approval
227+ requires :
228+ - deploy_staging
223229
230+ - queue/block_workflow :
231+ time : ' 30' # hold for 30 mins then abort
232+ requires :
233+ - wait_for_approval
234+
224235 - deploy :
225236 name : deploy_production
226237 requires :
227238 - unit_test
228239 - build_production
240+ - queue/block_workflow
229241 bucket : " <% index .Params `productionFrontendSubdomain` % ><% index .Params `productionHostRoot` % >"
230242 region : " <% index .Params `region` % >"
231243 filters :
You can’t perform that action at this time.
0 commit comments