Include build failure root cause in email notification (#2491)
Signed-off-by: shiranj <shiranj@amazon.com>
This commit is contained in:
Vendored
+12
-6
@@ -577,13 +577,19 @@ finally {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
node('controller') {
|
node('controller') {
|
||||||
step([
|
if("${currentBuild.currentResult}" == "SUCCESS") {
|
||||||
$class: 'Mailer',
|
emailBody = "${BUILD_URL}\nSuccess!"
|
||||||
notifyEveryUnstableBuild: true,
|
} else {
|
||||||
recipients: emailextrecipients([
|
buildFailure = tm('${BUILD_FAILURE_ANALYZER}')
|
||||||
|
emailBody = "${BUILD_URL}\n${buildFailure}!"
|
||||||
|
}
|
||||||
|
emailext (
|
||||||
|
body: "${emailBody}",
|
||||||
|
subject: "${currentBuild.currentResult}: ${JOB_NAME} - Build # ${BUILD_NUMBER}",
|
||||||
|
recipientProviders: [
|
||||||
[$class: 'RequesterRecipientProvider']
|
[$class: 'RequesterRecipientProvider']
|
||||||
])
|
]
|
||||||
])
|
)
|
||||||
}
|
}
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user