Skip to content

CI | Add Notification in Slack Channels for Nightly Runs When Fails (GAP) #8905

Open
@shirady

Description

@shirady

Environment info

  • NooBaa Version: 5.19
  • Platform: Internal CI with Slack channel

Actual behavior

  1. Currently, our nightly runs don't send a notification when it fails.

Expected behavior

  1. Add a notification when the nightly run fails.

Steps to reproduce

  1. 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"```

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions