From 79e02f8a8955a7a4b5b8c0a41b1237fe00e24743 Mon Sep 17 00:00:00 2001 From: Michael Zalimeni Date: Thu, 14 Dec 2023 18:13:04 -0500 Subject: [PATCH] ci: upload test results to DataDog on test failure (#19956) Due to the unintuitive behavior of GHA w.r.t. implicit status check `success()`, test results were only being uploaded on success (failures presumably came from retried tests that passed). --- .../nightly-test-integ-peering_commontopo.yml | 4 +- .../nightly-test-integrations-1.15.x.yml | 16 +++---- .../nightly-test-integrations-1.16.x.yml | 16 +++---- .../nightly-test-integrations-1.17.x.yml | 24 +++++----- .../workflows/nightly-test-integrations.yml | 24 +++++----- .github/workflows/reusable-unit-split.yml | 11 +++-- .github/workflows/reusable-unit.yml | 11 +++-- .../workflows/test-integrations-windows.yml | 8 ++-- .github/workflows/test-integrations.yml | 44 +++++++++---------- 9 files changed, 82 insertions(+), 76 deletions(-) diff --git a/.github/workflows/nightly-test-integ-peering_commontopo.yml b/.github/workflows/nightly-test-integ-peering_commontopo.yml index 418faaf3b4..2b571ea97c 100644 --- a/.github/workflows/nightly-test-integ-peering_commontopo.yml +++ b/.github/workflows/nightly-test-integ-peering_commontopo.yml @@ -106,12 +106,12 @@ jobs: TERM: ansi - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') && !cancelled() }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') && !cancelled() }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: diff --git a/.github/workflows/nightly-test-integrations-1.15.x.yml b/.github/workflows/nightly-test-integrations-1.15.x.yml index a6f2ce184f..ad4975898f 100644 --- a/.github/workflows/nightly-test-integrations-1.15.x.yml +++ b/.github/workflows/nightly-test-integrations-1.15.x.yml @@ -152,13 +152,13 @@ jobs: # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -169,14 +169,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -259,13 +259,13 @@ jobs: TERM: ansi # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -276,14 +276,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci diff --git a/.github/workflows/nightly-test-integrations-1.16.x.yml b/.github/workflows/nightly-test-integrations-1.16.x.yml index 2492f5c80a..4075443e28 100644 --- a/.github/workflows/nightly-test-integrations-1.16.x.yml +++ b/.github/workflows/nightly-test-integrations-1.16.x.yml @@ -155,13 +155,13 @@ jobs: # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -172,14 +172,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -280,13 +280,13 @@ jobs: TERM: ansi # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -297,14 +297,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci diff --git a/.github/workflows/nightly-test-integrations-1.17.x.yml b/.github/workflows/nightly-test-integrations-1.17.x.yml index 1dc692e010..2c02f9ded6 100644 --- a/.github/workflows/nightly-test-integrations-1.17.x.yml +++ b/.github/workflows/nightly-test-integrations-1.17.x.yml @@ -155,13 +155,13 @@ jobs: # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -172,14 +172,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -280,13 +280,13 @@ jobs: TERM: ansi # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -297,14 +297,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -370,13 +370,13 @@ jobs: TERM: ansi # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -387,14 +387,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci diff --git a/.github/workflows/nightly-test-integrations.yml b/.github/workflows/nightly-test-integrations.yml index cad173752f..a79d102b5e 100644 --- a/.github/workflows/nightly-test-integrations.yml +++ b/.github/workflows/nightly-test-integrations.yml @@ -152,13 +152,13 @@ jobs: # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -169,14 +169,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -277,13 +277,13 @@ jobs: TERM: ansi # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -294,14 +294,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -365,13 +365,13 @@ jobs: TERM: ansi # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -382,14 +382,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci diff --git a/.github/workflows/reusable-unit-split.yml b/.github/workflows/reusable-unit-split.yml index 0095d7739e..82b6136db2 100644 --- a/.github/workflows/reusable-unit-split.yml +++ b/.github/workflows/reusable-unit-split.yml @@ -133,13 +133,13 @@ jobs: # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -150,26 +150,29 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: ${{ env.DATADOG_API_KEY}} + if: ${{ !cancelled() && env.DATADOG_API_KEY}} env: DD_ENV: ci run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" ${{env.TEST_RESULTS}}/gotestsum-report.xml - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + if: ${{ !cancelled() }} with: name: test-results path: ${{env.TEST_RESULTS}} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + if: ${{ !cancelled() }} with: name: jsonfile path: /tmp/jsonfile - name: "Re-run fails report" + if: ${{ !cancelled() }} run: | .github/scripts/rerun_fails_report.sh /tmp/gotestsum-rerun-fails diff --git a/.github/workflows/reusable-unit.yml b/.github/workflows/reusable-unit.yml index 8a69d22385..386a699923 100644 --- a/.github/workflows/reusable-unit.yml +++ b/.github/workflows/reusable-unit.yml @@ -110,13 +110,13 @@ jobs: # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -127,26 +127,29 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: ${{ env.DATADOG_API_KEY}} + if: ${{ !cancelled() && env.DATADOG_API_KEY}} env: DD_ENV: ci run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" ${{env.TEST_RESULTS}}/gotestsum-report.xml - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + if: ${{ !cancelled() }} with: name: test-results path: ${{env.TEST_RESULTS}} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + if: ${{ !cancelled() }} with: name: jsonfile path: /tmp/jsonfile - name: "Re-run fails report" + if: ${{ !cancelled() }} run: | .github/scripts/rerun_fails_report.sh /tmp/gotestsum-rerun-fails diff --git a/.github/workflows/test-integrations-windows.yml b/.github/workflows/test-integrations-windows.yml index 51754ab6cd..9acbf8e990 100644 --- a/.github/workflows/test-integrations-windows.yml +++ b/.github/workflows/test-integrations-windows.yml @@ -1165,13 +1165,13 @@ jobs: # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -1183,14 +1183,14 @@ jobs: - name: Prepare datadog-ci shell: bash - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/download/v2.17.2/datadog-ci_win-x64.exe" --output "C:/datadog-ci" icacls C:/datadog-ci /grant:rx Everyone:RX - name: Upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci diff --git a/.github/workflows/test-integrations.yml b/.github/workflows/test-integrations.yml index 936ed06260..4dbbedf092 100644 --- a/.github/workflows/test-integrations.yml +++ b/.github/workflows/test-integrations.yml @@ -119,13 +119,13 @@ jobs: # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -136,14 +136,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -200,13 +200,13 @@ jobs: # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -217,14 +217,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -232,7 +232,7 @@ jobs: - name: upload leader coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -240,7 +240,7 @@ jobs: - name: upload agent coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -344,13 +344,13 @@ jobs: # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -361,14 +361,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -456,13 +456,13 @@ jobs: # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -473,14 +473,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci @@ -538,13 +538,13 @@ jobs: TERM: ansi # NOTE: ENT specific step as we store secrets in Vault. - name: Authenticate to Vault - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: vault-auth run: vault-auth # NOTE: ENT specific step as we store secrets in Vault. - name: Fetch Secrets - if: ${{ endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && endsWith(github.repository, '-enterprise') }} id: secrets uses: hashicorp/vault-action@v2.5.0 with: @@ -555,14 +555,14 @@ jobs: kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY; - name: prepare datadog-ci - if: ${{ !endsWith(github.repository, '-enterprise') }} + if: ${{ !cancelled() && !endsWith(github.repository, '-enterprise') }} run: | curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci" chmod +x /usr/local/bin/datadog-ci - name: upload coverage # do not run on forks - if: github.event.pull_request.head.repo.full_name == github.repository + if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository }} env: DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}" DD_ENV: ci