diff --git a/Slack-Notify-Plugin.md b/Slack-Notify-Plugin.md index d88dab3..79d3e02 100644 --- a/Slack-Notify-Plugin.md +++ b/Slack-Notify-Plugin.md @@ -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 ``` \ No newline at end of file