Skip to content

Commit bd60d8b

Browse files
authored
Merge pull request #5 from commitdev/add-region-to-circleci-config
Added templated region to config
2 parents 344d3fa + c339a70 commit bd60d8b

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:
@@ -169,9 +169,16 @@ jobs:
169169
bucket:
170170
description: The S3 Bucket to sync files to.
171171
type: string
172+
region:
173+
type: string
174+
default: ''
175+
description: |
176+
The region to use for AWS operations.
172177
steps:
173178
- attach_workspace:
174179
at: *workspace
180+
- run: # Required by aws-cli
181+
command: echo 'export AWS_REGION=<< parameters.region >>' >> $BASH_ENV
175182
- aws-s3/sync:
176183
from: build_<< parameters.config >>
177184
overwrite: true
@@ -205,7 +212,8 @@ workflows:
205212
config: staging
206213
requires:
207214
- build_staging
208-
bucket: <% index .Params `stagingFrontendHost` %>
215+
bucket: "<% index .Params `stagingFrontendHost` %>"
216+
region: "<% index .Params `region` %>"
209217
# Depending on your development flow you may want to also only deploy to staging on master.
210218
# filters:
211219
# branches:
@@ -217,7 +225,8 @@ workflows:
217225
requires:
218226
- unit_test
219227
- build_production
220-
bucket: <% index .Params `productionFrontendHost` %>
228+
bucket: "<% index .Params `productionFrontendHost` %>"
229+
region: "<% index .Params `region` %>"
221230
filters:
222231
branches:
223232
only: # only branches matching the below regex filters will run

0 commit comments

Comments
 (0)