From d3aa32da5a0872048cb402a1db5934db33cb2ce2 Mon Sep 17 00:00:00 2001 From: Brandon Palm Date: Wed, 1 Nov 2023 14:03:01 -0500 Subject: [PATCH 1/2] Send message to dev team if any QE run fails --- .github/workflows/qe-hosted.yml | 12 ++++++++++++ .github/workflows/qe-ocp-intrusive.yaml | 12 ++++++++++++ .github/workflows/qe-ocp.yaml | 12 ++++++++++++ .github/workflows/qe.yaml | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/.github/workflows/qe-hosted.yml b/.github/workflows/qe-hosted.yml index fc5ab132d..fcb224dbf 100644 --- a/.github/workflows/qe-hosted.yml +++ b/.github/workflows/qe-hosted.yml @@ -107,3 +107,15 @@ jobs: - name: Run the tests run: FEATURES=${{matrix.suite}} TNF_REPO_PATH=${GITHUB_WORKSPACE} TNF_IMAGE=${{env.TEST_TNF_IMAGE_NAME}} TNF_IMAGE_TAG=${{env.TEST_TNF_IMAGE_TAG}} DISABLE_INTRUSIVE_TESTS=true ENABLE_PARALLEL=true ENABLE_FLAKY_RETRY=true make test-features working-directory: cnfcert-tests-verification + + - name: (if on main and upstream) Send chat msg to dev team if failed to run QE tests + if: ${{ failure() && github.ref == 'refs/heads/main' && github.repository_owner == 'test-network-function' }} + env: + COMMIT_SHA: ${{ github.sha }} + JOB_RUN_ID: ${{ github.run_id }} + JOB_RUN_ATTEMPT: ${{ github.run_attempt }} + GITHUB_REPO: https://github.com/test-network-function/cnf-certification-test + run: | + curl -X POST --data "{ + \"text\": \"🚨⚠️ Failed to run Github hosted QE tests from commit \<$GITHUB_REPO/commit/$COMMIT_SHA|$COMMIT_SHA\>, job ID \<$GITHUB_REPO/actions/runs/$JOB_RUN_ID/attempts/$JOB_RUN_ATTEMPT|$JOB_RUN_ID\> \" + }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.GCHAT_WEBHOOK_URL }} diff --git a/.github/workflows/qe-ocp-intrusive.yaml b/.github/workflows/qe-ocp-intrusive.yaml index 73c93ee97..f02947acb 100644 --- a/.github/workflows/qe-ocp-intrusive.yaml +++ b/.github/workflows/qe-ocp-intrusive.yaml @@ -64,3 +64,15 @@ jobs: - name: Run the tests run: FEATURES=${{matrix.suite}} TNF_REPO_PATH=${GITHUB_WORKSPACE} TNF_IMAGE=${{env.TEST_TNF_IMAGE_NAME}} TNF_IMAGE_TAG=${{env.TEST_TNF_IMAGE_TAG}} DISABLE_INTRUSIVE_TESTS=false ENABLE_PARALLEL=false ENABLE_FLAKY_RETRY=true make test-features working-directory: cnfcert-tests-verification + + - name: (if on main and upstream) Send chat msg to dev team if failed to run QE tests + if: ${{ failure() && github.ref == 'refs/heads/main' && github.repository_owner == 'test-network-function' }} + env: + COMMIT_SHA: ${{ github.sha }} + JOB_RUN_ID: ${{ github.run_id }} + JOB_RUN_ATTEMPT: ${{ github.run_attempt }} + GITHUB_REPO: https://github.com/test-network-function/cnf-certification-test + run: | + curl -X POST --data "{ + \"text\": \"🚨⚠️ Failed to run intrusive OCP QE tests from commit \<$GITHUB_REPO/commit/$COMMIT_SHA|$COMMIT_SHA\>, job ID \<$GITHUB_REPO/actions/runs/$JOB_RUN_ID/attempts/$JOB_RUN_ATTEMPT|$JOB_RUN_ID\> \" + }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.GCHAT_WEBHOOK_URL }} diff --git a/.github/workflows/qe-ocp.yaml b/.github/workflows/qe-ocp.yaml index c2bf41579..a9fe7d6c6 100644 --- a/.github/workflows/qe-ocp.yaml +++ b/.github/workflows/qe-ocp.yaml @@ -63,3 +63,15 @@ jobs: - name: Run the tests run: FEATURES=${{matrix.suite}} TNF_REPO_PATH=${GITHUB_WORKSPACE} TNF_IMAGE=${{env.TEST_TNF_IMAGE_NAME}} TNF_IMAGE_TAG=${{env.TEST_TNF_IMAGE_TAG}} DISABLE_INTRUSIVE_TESTS=true ENABLE_PARALLEL=true ENABLE_FLAKY_RETRY=true make test-features working-directory: cnfcert-tests-verification + + - name: (if on main and upstream) Send chat msg to dev team if failed to run QE tests + if: ${{ failure() && github.ref == 'refs/heads/main' && github.repository_owner == 'test-network-function' }} + env: + COMMIT_SHA: ${{ github.sha }} + JOB_RUN_ID: ${{ github.run_id }} + JOB_RUN_ATTEMPT: ${{ github.run_attempt }} + GITHUB_REPO: https://github.com/test-network-function/cnf-certification-test + run: | + curl -X POST --data "{ + \"text\": \"🚨⚠️ Failed to run non-intrusive OCP QE tests from commit \<$GITHUB_REPO/commit/$COMMIT_SHA|$COMMIT_SHA\>, job ID \<$GITHUB_REPO/actions/runs/$JOB_RUN_ID/attempts/$JOB_RUN_ATTEMPT|$JOB_RUN_ID\> \" + }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.GCHAT_WEBHOOK_URL }} diff --git a/.github/workflows/qe.yaml b/.github/workflows/qe.yaml index 0ed809cb0..d8bd949d2 100644 --- a/.github/workflows/qe.yaml +++ b/.github/workflows/qe.yaml @@ -109,3 +109,15 @@ jobs: - name: Run the tests run: FEATURES=${{matrix.suite}} TNF_REPO_PATH=${GITHUB_WORKSPACE} TNF_IMAGE=${{env.TEST_TNF_IMAGE_NAME}} TNF_IMAGE_TAG=${{env.TEST_TNF_IMAGE_TAG}} DISABLE_INTRUSIVE_TESTS=true ENABLE_PARALLEL=true ENABLE_FLAKY_RETRY=true make test-features working-directory: cnfcert-tests-verification + + - name: (if on main and upstream) Send chat msg to dev team if failed to run QE tests + if: ${{ failure() && github.ref == 'refs/heads/main' && github.repository_owner == 'test-network-function' }} + env: + COMMIT_SHA: ${{ github.sha }} + JOB_RUN_ID: ${{ github.run_id }} + JOB_RUN_ATTEMPT: ${{ github.run_attempt }} + GITHUB_REPO: https://github.com/test-network-function/cnf-certification-test + run: | + curl -X POST --data "{ + \"text\": \"🚨⚠️ Failed to run Kind-based non-intrusive QE tests from commit \<$GITHUB_REPO/commit/$COMMIT_SHA|$COMMIT_SHA\>, job ID \<$GITHUB_REPO/actions/runs/$JOB_RUN_ID/attempts/$JOB_RUN_ATTEMPT|$JOB_RUN_ID\> \" + }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.GCHAT_WEBHOOK_URL }} From b600d1f900e634dcddd989eea25941a94b3a48ba Mon Sep 17 00:00:00 2001 From: Brandon Palm Date: Fri, 3 Nov 2023 10:07:41 -0500 Subject: [PATCH 2/2] Change webhook URL --- .github/workflows/qe-hosted.yml | 2 +- .github/workflows/qe-ocp-intrusive.yaml | 2 +- .github/workflows/qe-ocp.yaml | 2 +- .github/workflows/qe.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/qe-hosted.yml b/.github/workflows/qe-hosted.yml index fcb224dbf..88d72d115 100644 --- a/.github/workflows/qe-hosted.yml +++ b/.github/workflows/qe-hosted.yml @@ -118,4 +118,4 @@ jobs: run: | curl -X POST --data "{ \"text\": \"🚨⚠️ Failed to run Github hosted QE tests from commit \<$GITHUB_REPO/commit/$COMMIT_SHA|$COMMIT_SHA\>, job ID \<$GITHUB_REPO/actions/runs/$JOB_RUN_ID/attempts/$JOB_RUN_ATTEMPT|$JOB_RUN_ID\> \" - }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.GCHAT_WEBHOOK_URL }} + }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.QE_NIGHTLY_WEBHOOK }} diff --git a/.github/workflows/qe-ocp-intrusive.yaml b/.github/workflows/qe-ocp-intrusive.yaml index f02947acb..7709dcf34 100644 --- a/.github/workflows/qe-ocp-intrusive.yaml +++ b/.github/workflows/qe-ocp-intrusive.yaml @@ -75,4 +75,4 @@ jobs: run: | curl -X POST --data "{ \"text\": \"🚨⚠️ Failed to run intrusive OCP QE tests from commit \<$GITHUB_REPO/commit/$COMMIT_SHA|$COMMIT_SHA\>, job ID \<$GITHUB_REPO/actions/runs/$JOB_RUN_ID/attempts/$JOB_RUN_ATTEMPT|$JOB_RUN_ID\> \" - }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.GCHAT_WEBHOOK_URL }} + }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.QE_NIGHTLY_WEBHOOK }} diff --git a/.github/workflows/qe-ocp.yaml b/.github/workflows/qe-ocp.yaml index a9fe7d6c6..702224833 100644 --- a/.github/workflows/qe-ocp.yaml +++ b/.github/workflows/qe-ocp.yaml @@ -74,4 +74,4 @@ jobs: run: | curl -X POST --data "{ \"text\": \"🚨⚠️ Failed to run non-intrusive OCP QE tests from commit \<$GITHUB_REPO/commit/$COMMIT_SHA|$COMMIT_SHA\>, job ID \<$GITHUB_REPO/actions/runs/$JOB_RUN_ID/attempts/$JOB_RUN_ATTEMPT|$JOB_RUN_ID\> \" - }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.GCHAT_WEBHOOK_URL }} + }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.QE_NIGHTLY_WEBHOOK }} diff --git a/.github/workflows/qe.yaml b/.github/workflows/qe.yaml index d8bd949d2..1b46c4a87 100644 --- a/.github/workflows/qe.yaml +++ b/.github/workflows/qe.yaml @@ -120,4 +120,4 @@ jobs: run: | curl -X POST --data "{ \"text\": \"🚨⚠️ Failed to run Kind-based non-intrusive QE tests from commit \<$GITHUB_REPO/commit/$COMMIT_SHA|$COMMIT_SHA\>, job ID \<$GITHUB_REPO/actions/runs/$JOB_RUN_ID/attempts/$JOB_RUN_ATTEMPT|$JOB_RUN_ID\> \" - }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.GCHAT_WEBHOOK_URL }} + }" -H 'Content-type: application/json; charset=UTF-8' ${{ secrets.QE_NIGHTLY_WEBHOOK }}