diff --git a/.github/workflows/application-signals-e2e-test.yml b/.github/workflows/application-signals-e2e-test.yml index d01264d29b..0a5edbc7a6 100644 --- a/.github/workflows/application-signals-e2e-test.yml +++ b/.github/workflows/application-signals-e2e-test.yml @@ -6,10 +6,12 @@ # Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview name: Application Signals E2E Test on: - workflow_run: - workflows: [ Build Test Artifacts ] - types: - - completed + workflow_dispatch: + inputs: + build_run_id: + description: 'The ID of the build-test-artifacts workflow run' + type: number + required: true permissions: id-token: write @@ -23,9 +25,17 @@ concurrency: jobs: CheckBuildTestArtifacts: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - run: echo 'The triggering build workflow succeeded' + - run: | + conclusion=$(gh run view ${{ inputs.build_run_id }} --repo $GITHUB_REPOSITORY --json conclusion -q '.conclusion') + if [[ $conclusion == "success" ]]; then + echo "Run succeeded" + else + echo "Run failed" + exit 1 + fi + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} java-eks-e2e-test: needs: CheckBuildTestArtifacts diff --git a/.github/workflows/build-test-artifacts.yml b/.github/workflows/build-test-artifacts.yml index 5eacc04c8d..3b8ec31733 100644 --- a/.github/workflows/build-test-artifacts.yml +++ b/.github/workflows/build-test-artifacts.yml @@ -83,3 +83,19 @@ jobs: Region: "cn-north-1" TerraformAWSAssumeRole: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_CN }} Bucket: ${{ vars.S3_INTEGRATION_BUCKET_CN }} + + StartIntegrationTests: + needs: [ BuildAndUploadPackages, BuildAndUploadITAR, BuildAndUploadCN, BuildDocker ] + runs-on: ubuntu-latest + steps: + - run: gh workflow run integration-test.yml --ref ${{ github.ref_name }} --repo $GITHUB_REPOSITORY -f build_run_id=${{ github.run_id }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + StartApplicationSignalsE2ETests: + needs: [ BuildAndUpload, BuildDocker ] + runs-on: ubuntu-latest + steps: + - run: gh workflow run application-signals-e2e-test.yml --ref ${{ github.ref_name }} --repo $GITHUB_REPOSITORY -f build_run_id=${{ github.run_id }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 5afd0863f4..0c9138389b 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -20,10 +20,12 @@ env: S3_INTEGRATION_BUCKET_CN: ${{ vars.S3_INTEGRATION_BUCKET_CN }} on: - workflow_run: - workflows: [ Build Test Artifacts ] - types: - - completed + workflow_dispatch: + inputs: + build_run_id: + description: 'The ID of the build-test-artifacts workflow run' + type: number + required: true concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} @@ -32,9 +34,17 @@ concurrency: jobs: CheckBuildTestArtifacts: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - run: echo 'The triggering build workflow succeeded' + - run: | + conclusion=$(gh run view ${{ inputs.build_run_id }} --repo $GITHUB_REPOSITORY --json conclusion -q '.conclusion') + if [[ $conclusion == "success" ]]; then + echo "Run succeeded" + else + echo "Run failed" + exit 1 + fi + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GenerateTestMatrix: needs: [ CheckBuildTestArtifacts ]