File tree Expand file tree Collapse file tree 1 file changed +26
-24
lines changed
Expand file tree Collapse file tree 1 file changed +26
-24
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ version: 2.1
22orbs :
3344 aws-s3 :
circleci/[email protected] 5+ queue :
eddiewebb/[email protected] 56
67variables :
78 - &workspace /home/circleci/project
5051 root : *workspace
5152 paths :
5253 - out
53-
5454 deploy :
55- docker :
56- - image : cimg/python:3.6
57- parameters :
58- bucket :
59- description : The S3 Bucket to sync files to.
60- type : string
61- steps :
62- - attach_workspace :
63- at : *workspace
64- - aws-s3/sync :
65- from : out
66- overwrite : true
67- to : ' s3://<< parameters.bucket >>'
68- - run :
69- name : Invalidate Cloudfront
70- command : |
71- export DIST_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Aliases.Items[?@=='<< parameters.bucket >>']].Id | [0]" | tr -d '"')
72- aws cloudfront create-invalidation --distribution-id ${DIST_ID} --paths "/*"
73- modified_deploy :
7455 docker :
7556 - image : cimg/python:3.6
7657 parameters :
@@ -141,15 +122,36 @@ workflows:
141122 requires :
142123 - checkout_code
143124 - build :
144- name : build_feature
125+ name : build_staging
145126 helix_host : https://api-public.commit-staging.dev/email/apply
146127 requires :
147128 - checkout_code
148129 - deploy :
149- name : Deploy staging
130+ name : deploy_staging
150131 bucket : commit-staging.dev
151132 requires :
152- - build_feature
133+ - build_staging
134+ - build :
135+ name : build_production
136+ helix_host : https://api-public.commit.dev/email/apply
137+ requires :
138+ - checkout_code
139+ - wait_for_approval :
140+ type : approval
141+ requires :
142+ - deploy_staging
143+ - build_production
144+ - queue/block_workflow :
145+ name : queue_for_production_deploy
146+ time : ' 30'
147+ requires :
148+ - wait_for_approval
149+ - deploy :
150+ name : deploy_production
151+ bucket : commit.dev
152+ requires :
153+ - build_production
154+ - queue_for_production_deploy
153155
154156 launch :
155157 jobs :
@@ -167,7 +169,7 @@ workflows:
167169 helix_host : https://api-public.commit-staging.dev/email/apply
168170 requires :
169171 - checkout_code
170- - modified_deploy :
172+ - deploy :
171173 name : deploy_staging
172174 bucket : launch.commit-staging.dev
173175 requires :
You can’t perform that action at this time.
0 commit comments