Skip to content

Commit 940c198

Browse files
committed
Added templated region to config
1 parent 6f5eede commit 940c198

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.circleci/config.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
- store_artifacts:
113113
path: test-reports
114114

115-
# Requires the SLACK_WEBHOOK
115+
# Requires the SLACK_WEBHOOK env var to be set
116116
- slack/notify-on-failure
117117

118118
build:
@@ -153,9 +153,16 @@ jobs:
153153
bucket:
154154
description: The S3 Bucket to sync files to.
155155
type: string
156+
region:
157+
type: string
158+
default: ''
159+
description: |
160+
The region to use for AWS operations.
156161
steps:
157162
- attach_workspace:
158163
at: *workspace
164+
- run: # Required by aws-cli
165+
command: echo 'export AWS_REGION=<< parameters.region >>' >> $BASH_ENV
159166
- aws-s3/sync:
160167
from: build
161168
overwrite: true
@@ -180,7 +187,8 @@ workflows:
180187
name: deploy_staging
181188
requires:
182189
- build
183-
bucket: <% index .Params `stagingFrontendHost` %>
190+
bucket: "<% index .Params `stagingFrontendHost` %>"
191+
region: "<% index .Params `region` %>"
184192
# Depending on your development flow you may want to also only deploy to staging on master.
185193
# filters:
186194
# branches:
@@ -192,7 +200,8 @@ workflows:
192200
requires:
193201
- build
194202
- deploy_staging
195-
bucket: <% index .Params `productionFrontendHost` %>
203+
bucket: "<% index .Params `productionFrontendHost` %>"
204+
region: "<% index .Params `region` %>"
196205
filters:
197206
branches:
198207
only: # only branches matching the below regex filters will run

0 commit comments

Comments
 (0)