Last active
May 20, 2019 07:53
-
-
Save HarshadRanganathan/adfcb576ff8509220a46a398932211bc to your computer and use it in GitHub Desktop.
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
post { | |
success { | |
script { | |
def payload = """ | |
{ | |
"@type": "MessageCard", | |
"@context": "http://schema.org/extensions", | |
"themeColor": "0076D7", | |
"summary": "Oozie co-ordinators have been scheduled", | |
"sections": [{ | |
"activityTitle": "Oozie co-ordinators have been scheduled", | |
"activitySubtitle": "", | |
"activityImage": "https://cwiki.apache.org/confluence/download/attachments/30737784/oozie_47x200.png?version=1&modificationDate=1349284899000&api=v29", | |
"facts": [{ | |
"name": "COORDINATOR_START", | |
"value": "${params.COORDINATOR_START}" | |
}, { | |
"name": "COORDINATOR_END", | |
"value": "${params.COORDINATOR_END}" | |
}], | |
"markdown": true | |
}], | |
"potentialAction": [{ | |
"@type": "OpenUri", | |
"name": "View Build", | |
"targets": [ | |
{ "os": "default", "uri": "${BUILD_URL}" } | |
] | |
}] | |
}""" | |
httpRequest httpMode: 'POST', | |
acceptType: 'APPLICATION_JSON', | |
contentType: 'APPLICATION_JSON', | |
url: "${teamsWebhookUrl}", | |
requestBody: payload | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment