From 936b3f3c5b48f836758fbf30a8a75adabdaa2f3e Mon Sep 17 00:00:00 2001 From: Pat Somaru Date: Wed, 29 Jan 2025 17:31:35 -0500 Subject: [PATCH] add hooks to notify when periodic jobs fail --- .github/workflows/bpf-next-test.yml | 15 +++++++++++++++ .github/workflows/for-next-test.yml | 16 ++++++++++++++++ .github/workflows/stable.yml | 15 +++++++++++++++ 3 files changed, 46 insertions(+) diff --git a/.github/workflows/bpf-next-test.yml b/.github/workflows/bpf-next-test.yml index c47444326..885420ffe 100644 --- a/.github/workflows/bpf-next-test.yml +++ b/.github/workflows/bpf-next-test.yml @@ -155,4 +155,19 @@ jobs: path: ./log_save/*.ci.log # it's all txt files w/ 90 day retention, lets be nice. compression-level: 9 + notify-job: + runs-on: ubuntu-latest + if: ${{ (needs.integration-test.result == 'failure' || needs.integration-test.result == 'cancelled') }} + needs: + - integration-test + steps: + - uses: actions/checkout@v2 + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_USERNAME: ci + SLACK_TITLE: Workflow ${{ needs.integration-test.result }} + MSG_MINIMAL: bpf-next ci job failed. + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + diff --git a/.github/workflows/for-next-test.yml b/.github/workflows/for-next-test.yml index 90e81aba8..4b1b44d43 100644 --- a/.github/workflows/for-next-test.yml +++ b/.github/workflows/for-next-test.yml @@ -344,3 +344,19 @@ jobs: - run: cargo build --manifest-path scheds/rust/${{ matrix.scheduler }}/Cargo.toml - run: vng -v --rw --memory 10G --cpu 8 -r linux/arch/x86/boot/bzImage --network user -- cargo test --manifest-path scheds/rust/${{ matrix.scheduler }}/Cargo.toml + + notify-job: + runs-on: ubuntu-latest + if: ${{ (needs.integration-test.result == 'failure' || needs.integration-test.result == 'cancelled') }} + needs: + - integration-test + steps: + - uses: actions/checkout@v2 + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_USERNAME: ci + SLACK_TITLE: Workflow ${{ needs.integration-test.result }} + MSG_MINIMAL: for-next ci job failed. + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + \ No newline at end of file diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index 463f5acc0..c1bd4e3b9 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -156,3 +156,18 @@ jobs: # it's all txt files w/ 90 day retention, lets be nice. compression-level: 9 + notify-job: + runs-on: ubuntu-latest + if: ${{ (needs.integration-test.result == 'failure' || needs.integration-test.result == 'cancelled') }} + needs: + - integration-test + steps: + - uses: actions/checkout@v2 + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_USERNAME: ci + SLACK_TITLE: Workflow ${{ needs.integration-test.result }} + MSG_MINIMAL: stable ci job failed. + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + \ No newline at end of file