Created
June 23, 2020 08:15
-
-
Save ofen/bdedc923558980482adbad667599aea2 to your computer and use it in GitHub Desktop.
Jenkins Glip webhook notification
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
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