Created
July 22, 2014 22:02
-
-
Save schnittchen/05406adf2208f9f188d2 to your computer and use it in GitHub Desktop.
Hacked jenkins integration for slack
This file contains hidden or 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
// Install the "Groovy Postbuild" plugin and use this as postbuild script: | |
def message = "${manager.build.result}" + ': ' + manager.build.getDisplayName() + ' ' + manager.build.getAbsoluteUrl() | |
def command = ['sh', '-c', 'echo "' + message + '" | curl --data-binary @- "https://YOURSLACKDOMAIN/services/hooks/slackbot?token=YOUR_SLACKBOT_INTEFGRATION_TOKEN&channel=URL_ENCODED_CHANNEL_NAME"' ] | |
command.execute() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment