Slack Notifications
We live in slack. You may find it helpful to route notifications there from your pipelines.
This guide shows you how to add slack notifications when your build pipelines fail:
Procedure
-
Follow slack documentation for sending messages using incoming webhooks to create a slack app, enable incoming webhooks, and create the webhook url.
-
Upload the webhook url as a
Secret
to your namespace. -
Modify your build pipeline and add the following task to the
finally
block.finally: - name: slack-webhook-notification params: - name: message value: PipelineRun $(context.pipelineRun.name) failed - name: secret-name value: my-secret # name of secret in the your namespace which contains slack web-hook URL under key specified in 'key-name' parameter below - name: key-name value: dev-team taskRef: params: - name: bundle value: quay.io/konflux-ci/tekton-catalog/task-slack-webhook-notification:0.1 - name: name value: slack-webhook-notification - name: kind value: Task resolver: bundles when: - input: $(tasks.status) operator: in values: ["Failed"]
-
Commit your changes to the repository.
|