|
1 |
| -name: AWS E2E for releases and pre-releases |
| 1 | +name: Run AWS E2E for releases and pre-releases |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | workflow_dispatch:
|
5 | 5 | push:
|
6 | 6 | tags:
|
7 | 7 | - v*
|
8 |
| - paths-ignore: |
9 |
| - - '**.md' |
10 |
| - - 'cloudformation/*.yml' |
11 |
| - |
12 |
| -permissions: |
13 |
| - id-token: write # This is required for requesting the JWT |
14 |
| - contents: read # This is required for actions/checkout |
15 | 8 |
|
16 | 9 | jobs:
|
17 | 10 | run-e2e-for-releases-and-pre-releases:
|
| 11 | + permissions: |
| 12 | + id-token: write # This is required for requesting the JWT |
| 13 | + contents: read # This is required for actions/checkout |
18 | 14 | name: Run e2e for releases and pre-releases
|
19 | 15 | runs-on: ubuntu-latest
|
20 | 16 | steps:
|
21 | 17 | - name: Git clone
|
22 | 18 | uses: actions/checkout@v4
|
| 19 | + with: |
| 20 | + fetch-depth: 0 |
23 | 21 | - name: configure AWS credentials
|
24 | 22 | uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 #v4.0.2
|
25 | 23 | with:
|
26 | 24 | role-to-assume: ${{secrets.AWS_E2E_ROLE_ARN}}
|
27 | 25 | aws-region: ${{vars.AWS_E2E_REGION}}
|
28 | 26 | - name: Trigger AWS CodePipeline
|
29 | 27 | run: |
|
30 |
| - codepipeline_execution_id=$(aws codepipeline start-pipeline-execution --name ${{vars.AWS_E2E_RC_CODEPIPELINE_NAME}} --query 'pipelineExecutionId' --output text) |
| 28 | + commit=${{ github.sha }} |
| 29 | + tag=$(git tag --points-at "$commit") |
| 30 | + echo "Running tests for tag: $tag and commit SHA: $commit" |
| 31 | + codepipeline_execution_id=$(aws codepipeline start-pipeline-execution --name ${{vars.AWS_E2E_RC_CODEPIPELINE_NAME}} --source-revisions actionName=Source,revisionType=COMMIT_ID,revisionValue=$commit --query 'pipelineExecutionId' --output text) |
31 | 32 | echo "Pipeline execution ID: $codepipeline_execution_id"
|
32 | 33 | echo "codepipeline_execution_id=$codepipeline_execution_id" >> $GITHUB_ENV
|
33 | 34 | - name: Poll Pipeline Status
|
|
52 | 53 | fi
|
53 | 54 |
|
54 | 55 | done
|
| 56 | + - name: Output Pipeline Link |
| 57 | + if: always() |
| 58 | + run: | |
| 59 | + region=${{ vars.AWS_E2E_REGION }} |
| 60 | + pipeline_name=${{ vars.AWS_E2E_RC_CODEPIPELINE_NAME }} |
| 61 | + execution_id=${{ env.codepipeline_execution_id }} |
| 62 | + pipeline_url="https://${region}.console.aws.amazon.com/codesuite/codepipeline/pipelines/${pipeline_name}/executions/${execution_id}?region=${region}" |
| 63 | + echo "AWS CodePipeline Execution URL: $pipeline_url" |
| 64 | + echo "## AWS CodePipeline Execution Link" >> $GITHUB_STEP_SUMMARY |
| 65 | + echo "[$pipeline_url]($pipeline_url)" >> $GITHUB_STEP_SUMMARY |
0 commit comments