-
Notifications
You must be signed in to change notification settings - Fork 204
Home
Easily send customized Slack notifications as a part of your CI/CD pipeline, using rich templates.
The Slack orb makes use of OAuth to post messages to your Slack workspace. Follow our setup guide for authenticating with Slack.
For full usage guidelines, see the orb registry listing.
The Slack Orb comes with a number of included templates to get your started with minimal setup. Feel free to use an included template or create your own.
Template Preview | Template | Description |
---|---|---|
basic_success_1 | Should be used with the "pass" event. | |
basic_fail_1 | Should be used with the "fail" event. | |
success_tagged_deploy_1 | To be used in the event of a successful deployment job. see orb usage examples | |
basic_on_hold_1 | To be used in the on-hold job. see orb usage examples |
- Open the Slack Block Kit Builder: https://app.slack.com/block-kit-builder/
- Design your desired notification message.
- Replace any placeholder values with $ENV environment variable strings.
- Set the resulting code as the value for your
custom
parameter.
- slack/notify:
event: always
custom: |
{
"blocks": [
{
"type": "section",
"fields": [
{
"type": "plain_text",
"text": "*This is a text notification*",
"emoji": true
}
]
}
]
}
Limit Slack notifications to particular branches with the "branch_pattern" parameter.
A comma separated list of regex matchable branch names. Notifications will only be sent if sent from a job from these branches. By default ".+" will be used to match all branches. Pattern must match the full string, no partial matches.
See usage examples.
View the FAQ Page