-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): Add dump of govcloud layer info in verify step (#5415)
* chore(ci): Add dump of govcloud layer info in verify step * shellcheck updates * add manual verification * Update .github/workflows/layer_govcloud_verify.yml Co-authored-by: Leandro Damascena <lcdama@amazon.pt> Signed-off-by: Simon Thulbourn <sthulb@users.noreply.github.com> * Update .github/workflows/layer_govcloud_verify.yml Co-authored-by: Leandro Damascena <lcdama@amazon.pt> Signed-off-by: Simon Thulbourn <sthulb@users.noreply.github.com> --------- Signed-off-by: Simon Thulbourn <sthulb@users.noreply.github.com> Co-authored-by: Simon Thulbourn <sthulb@@users.noreply.github.com> Co-authored-by: Leandro Damascena <lcdama@amazon.pt>
- Loading branch information
1 parent
0f6f543
commit 25d6404
Showing
2 changed files
with
136 additions
and
24 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,111 @@ | ||
# GovCloud Layer Verification | ||
# --- | ||
# This workflow queries the GovCloud layer info in production only | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Layer version to verify information | ||
type: string | ||
required: true | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: Layer version to verify information | ||
type: string | ||
required: true | ||
|
||
name: Layer Verification (GovCloud) | ||
run-name: Layer Verification (GovCloud) | ||
|
||
jobs: | ||
commercial: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
strategy: | ||
matrix: | ||
layer: | ||
- AWSLambdaPowertoolsPythonV3-python38 | ||
- AWSLambdaPowertoolsPythonV3-python39 | ||
- AWSLambdaPowertoolsPythonV3-python310 | ||
- AWSLambdaPowertoolsPythonV3-python311 | ||
- AWSLambdaPowertoolsPythonV3-python312 | ||
arch: | ||
- arm64 | ||
- x86_64 | ||
environment: Prod (Readonly) | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_IAM_ROLE }} | ||
aws-region: us-east-1 | ||
mask-aws-account-id: true | ||
- name: Output ${{ matrix.layer }}-${{ matrix.arch }} | ||
run: | | ||
aws --region us-east-1 lambda get-layer-version-by-arn --arn arn:aws:lambda:us-east-1:017000801446:layer:${{ matrix.layer }}-${{ matrix.arch }}:${{ inputs.version }} --output text | ||
gov_east: | ||
name: Verify (East) | ||
needs: commercial | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
strategy: | ||
matrix: | ||
layer: | ||
- AWSLambdaPowertoolsPythonV3-python38 | ||
- AWSLambdaPowertoolsPythonV3-python39 | ||
- AWSLambdaPowertoolsPythonV3-python310 | ||
- AWSLambdaPowertoolsPythonV3-python311 | ||
- AWSLambdaPowertoolsPythonV3-python312 | ||
arch: | ||
- arm64 | ||
- x86_64 | ||
environment: GovCloud Prod (East) | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_IAM_ROLE }} | ||
aws-region: us-gov-east-1 | ||
mask-aws-account-id: true | ||
- name: Verify Layer ${{ matrix.layer }}-${{ matrix.arch }} | ||
id: verify-layer | ||
run: | | ||
aws --region us-gov-east-1 lambda get-layer-version-by-arn --arn 'arn:aws-us-gov:lambda:us-gov-east-1:${{ secrets.AWS_ACCOUNT_ID }}:layer:${{ matrix.layer }}-${{ matrix.arch }}:${{ inputs.version }}' --output text | ||
gov_west: | ||
name: Verify (West) | ||
needs: commercial | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
strategy: | ||
matrix: | ||
layer: | ||
- AWSLambdaPowertoolsPythonV3-python38 | ||
- AWSLambdaPowertoolsPythonV3-python39 | ||
- AWSLambdaPowertoolsPythonV3-python310 | ||
- AWSLambdaPowertoolsPythonV3-python311 | ||
- AWSLambdaPowertoolsPythonV3-python312 | ||
arch: | ||
- arm64 | ||
- x86_64 | ||
environment: GovCloud Prod (West) | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_IAM_ROLE }} | ||
aws-region: us-gov-east-1 | ||
mask-aws-account-id: true | ||
- name: Verify Layer ${{ matrix.layer }}-${{ matrix.arch }} | ||
id: verify-layer | ||
run: | | ||
aws --region us-gov-west-1 lambda get-layer-version-by-arn --arn 'arn:aws-us-gov:lambda:us-gov-west-1:${{ secrets.AWS_ACCOUNT_ID }}:layer:${{ matrix.layer }}-${{ matrix.arch }}:${{ inputs.version }}' --output text |