Open
Description
Environment info
- NooBaa Version: 5.19
- Platform: Internal CI with Slack channel
Actual behavior
- Currently, our nightly runs don't send a notification when it fails.
Expected behavior
- Add a notification when the nightly run fails.
Steps to reproduce
- none, it was raised as part of PR CI | Data Buckets | Test AWS SDK Clients #8847.
More information - Screenshots / Logs / Other output
Relevant links:
[1] Webhooks in Slack
[2] Basic example of the step that we need to add
[3] What was tried in the past and failed in the PR CI runs
The curl that I tested locally (and worked):
curl -X POST <address-to-web-hook> \
-H "Content-type: application/json" \
-d '{"text": "hello_world (Shira)"}'
Part of the yaml that I tried to run:
# this should be removed
- name: Test slack webhook
uses: slackapi/[email protected]
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
text: "Hello world (Shira is testing webhook)"
# this should be added
# later we would add the if: ${{ failure() }} condition
# - name: Post a message in a channel
# uses: slackapi/[email protected]
# with:
# webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
# webhook-type: incoming-webhook
# payload: |
# text: "*GitHub Action Test AWS SDK Clients Result*: ${{ job.status }}\n"
# blocks:
# - type: "section"
# text:
# type: "mrkdwn"
# text: "GitHub Action build result: ${{ job.status }}\n"```