Merge pull request #144 from bitnami/feature/CONTENT-3783

[bitnami/*] ci: Configure Slack alerts for CI failures in bitnami/minideb
This commit is contained in:
ClaaudiaGarcia
2023-04-28 10:15:37 +01:00
committed by GitHub
+37
View File
@@ -82,3 +82,40 @@ jobs:
- name: Push Manifests - name: Push Manifests
run: | run: |
DISTS="buster bullseye latest" bash pushmanifest DISTS="buster bullseye latest" bash pushmanifest
# If the CI Pipeline does not succeed we should notify the interested agents
slack-notif:
runs-on: ubuntu-22.04
needs:
- build_multiarch
- deploy_manifests
if: always()
name: Notify unsuccessful CI run
steps:
- name: Notify in Slack channel
if: ${{ needs.build_multiarch.result == 'failure' || needs.deploy_manifests.result == 'failure' }}
uses: slackapi/slack-github-action@v1.23.0
with:
payload: |
{
"text": "*Unsuccessful `bitnami/minideb` CI pipeline*",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Unsuccessful `bitnami/minideb` CI pipeline*"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "The CI pipeline for `bitnami/minideb` did not succeed. Check the related <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|action run> for more information."
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.CI_SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK