-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLT-271 Promotion workflows for opt-out-import (#75)
- Loading branch information
Showing
4 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Deploy opt-out-import to prod | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
AWS_REGION: ${{ vars.AWS_REGION }} | ||
|
||
jobs: | ||
deploy: | ||
runs-on: self-hosted | ||
environment: prod | ||
|
||
steps: | ||
- name: Assume role in target account | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
aws-region: ${{ vars.AWS_REGION }} | ||
role-to-assume: ${{ vars.ACCOUNT_ROLE }} | ||
|
||
- name: Promote lambda code from test to prod | ||
run: | | ||
aws s3 cp --no-progress s3://${{ vars.OPT_OUT_IMPORT_TEST_ZIP_BUCKET }}/function.zip s3://${{ vars.OPT_OUT_IMPORT_ZIP_BUCKET }}/function.zip | ||
aws lambda update-function-code --function-name ab2d-prod-opt-out-import --s3-bucket ${{ vars.OPT_OUT_IMPORT_ZIP_BUCKET }} --s3-key function.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Deploy opt-out-import to sbx (sandbox) | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
AWS_REGION: ${{ vars.AWS_REGION }} | ||
|
||
jobs: | ||
deploy: | ||
runs-on: self-hosted | ||
environment: sbx | ||
|
||
steps: | ||
- name: Assume role in target account | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
aws-region: ${{ vars.AWS_REGION }} | ||
role-to-assume: ${{ vars.ACCOUNT_ROLE }} | ||
|
||
- name: Promote lambda code from test to sbx | ||
run: | | ||
aws s3 cp --no-progress s3://${{ vars.OPT_OUT_IMPORT_TEST_ZIP_BUCKET }}/function.zip s3://${{ vars.OPT_OUT_IMPORT_ZIP_BUCKET }}/function.zip | ||
aws lambda update-function-code --function-name ab2d-sbx-opt-out-import --s3-bucket ${{ vars.OPT_OUT_IMPORT_ZIP_BUCKET }} --s3-key function.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters