-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(687): Add Slack notifications settings for user and cluster admin (…
…#140) * fix(687): Add Slack notifications settings for user and cluster admin * fix: Add bot link * fix: Combine notification examples
- Loading branch information
Showing
4 changed files
with
69 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,25 +8,70 @@ toc: | |
url: "#settings" | ||
- title: Email | ||
url: "#email" | ||
- title: Slack | ||
url: "#slack" | ||
--- | ||
# Settings | ||
Configurable settings for any additional build plugins added to Screwdriver.cd. | ||
|
||
To enable emails to be sent as a result of build events, use the email setting. | ||
You can configure a list of one or more email addresses to contact. You can also configure when to send an email, e.g. when the build status is `SUCCESS` and/or `FAILURE`. | ||
The settings can be set in `shared`, to apply to all jobs, or in an individual job. A job-level setting will completely override the `shared` setting. | ||
|
||
If you don't configure the build status, the notification will default to sending notifications on `FAILURE` only. | ||
|
||
### Example | ||
``` | ||
shared: | ||
template: example/mytemplate@stable | ||
settings: | ||
email: [[email protected], [email protected]] | ||
slack: 'mychannel' | ||
jobs: | ||
main: | ||
template: example/mytemplate@stable | ||
``` | ||
|
||
``` | ||
jobs: | ||
main: | ||
template: example/mytemplate@stable | ||
settings: | ||
email: [[email protected], [email protected]] | ||
slack: 'mychannel' | ||
``` | ||
|
||
To enable emails to be sent as a result of build events, use the email setting. | ||
You can configure a list of one or more email addresses to contact. You can also configure when to send an email, e.g. when the build status is `SUCCESS` and/or `FAILURE`. | ||
|
||
### Example | ||
``` | ||
settings: | ||
email: | ||
addresses: [[email protected], [email protected]] | ||
statuses: [SUCCESS, FAILURE] | ||
``` | ||
|
||
The settings email configuration can be set in `shared`, to apply to all jobs, or in an individual job. A job `email` configuration will completely override the `shared` setting. | ||
## Slack | ||
To enable Slack notifications to be sent as a result of build events, invite the `screwdriver-bot` Slack bot to your channel(s) and use the Slack setting in your Screwdriver yaml. | ||
You can configure a list of one or more Slack channels to notify. You can also configure when to send a Slack notification, e.g. when the build status is `SUCCESS` and/or `FAILURE`. | ||
|
||
### Example | ||
|
||
This Slack setting will send Slack notifications to `mychannel` and `my-other-channel` on all build statuses: | ||
|
||
``` | ||
settings: | ||
slack: | ||
channels: | ||
- 'mychannel' | ||
- 'my-other-channel' | ||
statuses: | ||
- SUCCESS | ||
- FAILURE | ||
- ABORTED | ||
- QUEUED | ||
- RUNNING | ||
``` | ||
|
||
Success notification: | ||
|
||
![Slack notification](../assets/slack-notification.png) |