Skip to content

chore: Pin shfmt to 3.14.0 (#2261) #1954

chore: Pin shfmt to 3.14.0 (#2261)

chore: Pin shfmt to 3.14.0 (#2261) #1954

# 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'
- 'THIRD-PARTY'
- 'LICENSE'
- '.github/**'
- '!.github/workflows/build-test-artifacts.yml'
- '!.github/workflows/integration-test.yml'
- '!.github/workflows/application-signals-e2e-test.yml'
schedule:
- cron: '0 11 * * 1,2,3,4,5' # Every day at 11:00 UTC on Monday to Friday
workflow_dispatch:
inputs:
run-tests:
description: "Run test workflows after build"
default: true
type: boolean
workflow_call:
inputs:
run-tests:
description: "Run test workflows after build"
default: true
type: boolean
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 }}
RecordBinarySizes:
needs: [BuildAndUpload]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: ./.github/workflows/record-binary-sizes.yml
secrets: inherit
permissions:
id-token: write
contents: read
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 }}"
BuildDistributor:
needs: [BuildAndUpload, BuildAndUploadPackages, BuildDocker]
uses: ./.github/workflows/test-build-distributor.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 }}
DistributorName: ${{ vars.SSM_TEST_DISTRIBUTOR_NAME }}
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 }}
StartIntegrationTests:
needs: [ BuildAndUploadPackages, BuildAndUploadITAR, BuildAndUploadCN, BuildDocker, BuildDistributor ]
if: ${{ github.event_name == 'push' || inputs.run-tests }}
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REF_NAME: ${{ github.ref_name }}
RUN_ID: ${{ github.run_id }}
GITHUB_SHA_VAL: ${{ github.sha }}
run: gh workflow run integration-test.yml --ref "$REF_NAME" --repo "$GITHUB_REPOSITORY" -f "build_run_id=$RUN_ID" -f "build_sha=$GITHUB_SHA_VAL"
StartApplicationSignalsE2ETests:
needs: [ BuildAndUploadPackages, BuildAndUploadITAR, BuildAndUploadCN, BuildDocker, BuildDistributor ]
# Workflow only runs against main
if: ${{ github.event_name == 'push' || inputs.run-tests }}
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REF_NAME: ${{ github.ref_name }}
RUN_ID: ${{ github.run_id }}
GITHUB_SHA_VAL: ${{ github.sha }}
run: gh workflow run application-signals-e2e-test.yml --ref "$REF_NAME" --repo "$GITHUB_REPOSITORY" -f "build_run_id=$RUN_ID" -f "build_sha=$GITHUB_SHA_VAL"
StartEKSE2ETests:
needs: [ BuildAndUploadPackages, BuildAndUploadITAR, BuildAndUploadCN, BuildDocker, BuildDistributor ]
if: ${{ github.event_name == 'push' || inputs.run-tests }}
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REF_NAME: ${{ github.ref_name }}
GITHUB_SHA_VAL: ${{ github.sha }}
run: gh workflow run e2e-test.yml --ref "$REF_NAME" --repo "$GITHUB_REPOSITORY" -f "build_sha=$GITHUB_SHA_VAL"
StartWorkloadDiscoveryIntegrationTests:
needs: [ BuildAndUploadPackages, BuildAndUploadITAR, BuildAndUploadCN, BuildDocker, BuildDistributor ]
if: ${{ github.event_name == 'push' || inputs.run-tests }}
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REF_NAME: ${{ github.ref_name }}
RUN_ID: ${{ github.run_id }}
GITHUB_SHA_VAL: ${{ github.sha }}
run: gh workflow run wd-integration-test.yml --ref "$REF_NAME" --repo "$GITHUB_REPOSITORY" -f "build_run_id=$RUN_ID" -f "build_sha=$GITHUB_SHA_VAL"