From 189be24da9dbbedf5509ed1755ce29f635927b13 Mon Sep 17 00:00:00 2001 From: Stephen Ball Date: Thu, 12 Nov 2015 13:26:26 +0000 Subject: [PATCH] Updated Slack Notify Plugin (markdown) --- Slack-Notify-Plugin.md | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) 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