Switch branches/tags
Nothing to show
Find file Copy path
188512d Jan 19, 2016
0 contributors

Users who have contributed to this file

13 lines (12 sloc) 615 Bytes
import groovy.json.JsonOutput
// Add whichever params you think you'd most want to have
// replace the slackURL below with the hook url provided by
// slack when you configure the webhook
def notifySlack(text, channel) {
def slackURL = ''
def payload = JsonOutput.toJson([text : text,
channel : channel,
username : "jenkins",
icon_emoji: ":jenkins:"])
sh "curl -X POST --data-urlencode \'payload=${payload}\' ${slackURL}"