-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from CircleCI-Public/feat/auth-step-parameter
feat!/auth-step-parameter
- Loading branch information
Showing
8 changed files
with
92 additions
and
61 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
This file was deleted.
Oops, something went wrong.
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,48 @@ | ||
description: > | ||
Test your Lambda functions in a staging environment before deploying to production with the "deploy" job using OIDC authentication. | ||
Import the aws-cli orb and authenticate using the aws-cli/setup command with a valid role-arn for OIDC authentication. | ||
usage: | ||
version: 2.1 | ||
orbs: | ||
sam: circleci/aws-sam-serverless@5.0 | ||
# Importing aws-cli orb is required for OIDC authentication | ||
aws-cli: circleci/aws-cli@3.1 | ||
jobs: | ||
test_my_api: | ||
docker: | ||
- image: cimg/node:lts | ||
steps: | ||
- run: echo "Run your API tests here" | ||
workflows: | ||
test_and_deploy: | ||
jobs: | ||
- sam/deploy: | ||
name: deploy-staging | ||
auth: | ||
- aws-cli/setup: | ||
profile: OIDC-USER | ||
role-arn: "arn:aws:iam::123456789012:role/VALID_OIDC_SAM_ROLE" | ||
# Must use same profile configured in aws-cli/setup command | ||
profile: OIDC-USER | ||
template: ./path/to/template.yml | ||
stack-name: staging-stack | ||
s3-bucket: my-s3-bucket | ||
# Valid CircleCI context | ||
context: CircleCI_OIDC_Token | ||
- test_my_api: | ||
requires: | ||
- deploy-staging | ||
- sam/deploy: | ||
name: deploy-production | ||
auth: | ||
- aws-cli/setup: | ||
profile: OIDC-USER | ||
role-arn: "arn:aws:iam::123456789012:role/VALID_OIDC_SAM_ROLE" | ||
# Must use same profile configured in aws-cli/setup command | ||
profile: OIDC-USER | ||
template: "./path/to/template.yml" | ||
stack-name: "production-stack" | ||
# Valid CircleCI context | ||
context: CircleCI_OIDC_Token | ||
requires: | ||
- test_my_api |
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
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