Updated Slack Notify Plugin (markdown)
parent
9bedc807bd
commit
189be24da9
1 changed files with 23 additions and 9 deletions
|
|
@ -11,13 +11,27 @@ This plugin joins a [Slack](https://www.slack.com/) room and sends a user-define
|
|||
| `message` | No | The message to send to the room. Default - `<%PROJECT_URI%|%PROJECT_TITLE%> - <%BUILD_URI%|Build #%BUILD%> has finished for commit <%COMMIT_URI%|%SHORT_COMMIT% (%COMMIT_EMAIL%)> on branch <%BRANCH_URI%|%BRANCH%>` |
|
||||
| `show_status` | No | Whether or not to append the build status as an attachment in slack. Default - true
|
||||
|
||||
Configuration example:
|
||||
```yaml
|
||||
slack_notify:
|
||||
webhook_url: "https://hooks.slack.com/services/R212T827A/G983UY31U/aIp0yuW9u0iTqwAMOEwTg"
|
||||
room: "#phpci"
|
||||
username: "PHPCI"
|
||||
icon: ":ghost:"
|
||||
message: "%PROJECT_TITLE% - build %BUILD% completed"
|
||||
show_status: true
|
||||
Send a message if the build fails:
|
||||
```yams
|
||||
failure:
|
||||
slack_notify:
|
||||
webhook_url: "https://hooks.slack.com/services/R212T827A/G983UY31U/aIp0yuW9u0iTqwAMOEwTg"
|
||||
room: "#phpci"
|
||||
username: "PHPCI"
|
||||
icon: ":ghost:"
|
||||
message: "%PROJECT_TITLE% - build %BUILD% failed! :angry:"
|
||||
show_status: false
|
||||
```
|
||||
|
||||
Send a message every time the build is run:
|
||||
|
||||
```yams
|
||||
failure:
|
||||
slack_notify:
|
||||
webhook_url: "https://hooks.slack.com/services/R212T827A/G983UY31U/aIp0yuW9u0iTqwAMOEwTg"
|
||||
room: "#phpci"
|
||||
username: "PHPCI"
|
||||
icon: ":ghost:"
|
||||
message: "%PROJECT_TITLE% - build %BUILD% completed :smiley:"
|
||||
show_status: true
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue