Created
July 27, 2017 12:53
-
-
Save davidvesely/06c12bc84ad2b5cb78c7c6fbb03cb51a to your computer and use it in GitHub Desktop.
Jenkins pipeline email notification
This file contains 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
# Plugin - Email Extension Plugin | |
def notifySuccessful() { | |
emailext ( | |
subject: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'", | |
body: """<p>SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p> | |
<p>Check console output at "<a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>"</p>""", | |
recipientProviders: [[$class: 'DevelopersRecipientProvider']] | |
) | |
} | |
def notifyFailed() { | |
emailext ( | |
subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'", | |
body: """<p>FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p> | |
<p>Check console output at "<a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>"</p>""", | |
recipientProviders: [[$class: 'DevelopersRecipientProvider']] | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment