Skip to content

Instantly share code, notes, and snippets.

@ofen
Created June 23, 2020 08:15
Show Gist options
  • Save ofen/bdedc923558980482adbad667599aea2 to your computer and use it in GitHub Desktop.
Save ofen/bdedc923558980482adbad667599aea2 to your computer and use it in GitHub Desktop.
Jenkins Glip webhook notification
def glip(java.util.LinkedHashMap params) {
def payload = [
activity: params.activity,
title: params.title,
icon: params.icon,
body: params.body
]
httpRequest(
acceptType: 'APPLICATION_JSON',
contentType: 'APPLICATION_JSON',
httpMode: 'POST',
requestBody: groovy.json.JsonOutput.toJson(payload),
url: params.webhookUrl
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment