Skip to content

Commit c5d3d48

Browse files
104 launch branch main pipeline (#144)
* 104 wip of launch branch main pipeline * 104 fix typo in build name * 104 fix another build typo * 104 test of main pipeline on commit-staging * 104 remove testing config the main pipeline
1 parent 9fb9810 commit c5d3d48

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

.circleci/config.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: 2.1
22
orbs:
33
node: circleci/[email protected]
44
aws-s3: circleci/[email protected]
5+
queue: eddiewebb/[email protected]
56

67
variables:
78
- &workspace /home/circleci/project
@@ -50,27 +51,7 @@ jobs:
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:

0 commit comments

Comments
 (0)