Skip to content

Commit

Permalink
Merge pull request #1266 from likewhatevs/add-ci-failure-notify
Browse files Browse the repository at this point in the history
add hooks to notify when periodic jobs fail
  • Loading branch information
likewhatevs authored Jan 30, 2025
2 parents cc58696 + 936b3f3 commit b3bfd51
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/bpf-next-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}


16 changes: 16 additions & 0 deletions .github/workflows/for-next-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

15 changes: 15 additions & 0 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit b3bfd51

Please sign in to comment.