Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate build jobs for artifacts and trigger tests with workflow_run #1269

Merged
merged 4 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .github/workflows/application-signals-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# This is a reusable workflow for running the E2E test for Application Signals.
# It is meant to be called from another workflow.
# Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview
name: E2E Testing
name: Application Signals E2E Test
on:
workflow_call:
workflow_run:
workflows: [ Build Test Artifacts ]
types:
- completed

permissions:
id-token: write
Expand All @@ -18,7 +21,14 @@ concurrency:


jobs:
CheckBuildTestArtifacts:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: echo 'The triggering build workflow succeeded'
okankoAMZ marked this conversation as resolved.
Show resolved Hide resolved

java-eks-e2e-test:
needs: CheckBuildTestArtifacts
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-eks-e2e-test.yml@main
secrets: inherit
with:
Expand All @@ -27,21 +37,23 @@ jobs:
caller-workflow-name: 'main-build'

java-ec2-default-e2e-test:
needs: CheckBuildTestArtifacts
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-ec2-default-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'

java-ec2-asg-e2e-test:
needs: [ CheckBuildTestArtifacts ]
jefchien marked this conversation as resolved.
Show resolved Hide resolved
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-ec2-asg-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'

java-metric-limiter-e2e-test:
needs: [ java-eks-e2e-test ]
needs: [ CheckBuildTestArtifacts, java-eks-e2e-test ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-metric-limiter-e2e-test.yml@main
secrets: inherit
with:
Expand All @@ -50,14 +62,15 @@ jobs:
caller-workflow-name: 'main-build'

java-k8s-e2e-test:
needs: [ CheckBuildTestArtifacts ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-k8s-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'

python-eks-e2e-test:
needs: [ java-metric-limiter-e2e-test ]
needs: [ CheckBuildTestArtifacts, java-metric-limiter-e2e-test ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-eks-e2e-test.yml@main
secrets: inherit
with:
Expand All @@ -66,21 +79,23 @@ jobs:
caller-workflow-name: 'main-build'

python-ec2-default-e2e-test:
needs: [ CheckBuildTestArtifacts ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'

python-ec2-asg-e2e-test:
needs: [ CheckBuildTestArtifacts ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-asg-e2e-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'

python-k8s-e2e-test:
needs: [ java-k8s-e2e-test ]
needs: [ CheckBuildTestArtifacts, java-k8s-e2e-test ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-k8s-e2e-test.yml@main
secrets: inherit
with:
Expand Down
85 changes: 85 additions & 0 deletions .github/workflows/build-test-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT

name: Build Test Artifacts
on:
push:
branches:
- main*
paths-ignore:
- '**/*.md'
- 'NOTICE'
- 'RELEASE_NOTES'
- 'THIRD-PARTY'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/build-test-artifacts.yml'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
BuildAndUpload:
uses: ./.github/workflows/test-build.yml
secrets: inherit
permissions:
id-token: write
contents: read
with:
BucketKey: "integration-test/binary/${{ github.sha }}"
PackageBucketKey: "integration-test/packaging/${{ github.sha }}"
TerraformAWSAssumeRole: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE }}
Bucket: ${{ vars.S3_INTEGRATION_BUCKET }}

BuildAndUploadPackages:
uses: ./.github/workflows/test-build-packages.yml
needs: [BuildAndUpload]
secrets: inherit
permissions:
id-token: write
contents: read
with:
BucketKey: "integration-test/binary/${{ github.sha }}"
PackageBucketKey: "integration-test/packaging/${{ github.sha }}"
TerraformAWSAssumeRole: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE }}
Bucket: ${{ vars.S3_INTEGRATION_BUCKET }}

BuildDocker:
needs: [BuildAndUpload]
uses: ./.github/workflows/test-build-docker.yml
secrets: inherit
permissions:
id-token: write
contents: read
with:
ContainerRepositoryNameAndTag: "cwagent-integration-test:${{ github.sha }}"
BucketKey: "integration-test/binary/${{ github.sha }}"
PackageBucketKey: "integration-test/packaging/${{ github.sha }}"

BuildAndUploadITAR:
uses: ./.github/workflows/test-build.yml
secrets: inherit
permissions:
id-token: write
contents: read
with:
BucketKey: "integration-test/binary/${{ github.sha }}"
PackageBucketKey: "integration-test/packaging/${{ github.sha }}"
Region: "us-gov-east-1"
TerraformAWSAssumeRole: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_ITAR }}
Bucket: ${{ vars.S3_INTEGRATION_BUCKET_ITAR }}

BuildAndUploadCN:
uses: ./.github/workflows/test-build.yml
secrets: inherit
permissions:
id-token: write
contents: read
with:
BucketKey: "integration-test/binary/${{ github.sha }}"
PackageBucketKey: "integration-test/packaging/${{ github.sha }}"
Region: "cn-north-1"
TerraformAWSAssumeRole: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_CN }}
Bucket: ${{ vars.S3_INTEGRATION_BUCKET_CN }}
Loading
Loading