Jenkins notifications on failure

This commit is contained in:
Juan Ferrer 2019-01-08 17:17:12 +01:00
parent 4af9e47c8d
commit 5078775a74
1 changed files with 2 additions and 1 deletions

3
Jenkinsfile vendored
View File

@ -64,11 +64,12 @@ if (env.GIT_COMMITTER_EMAIL) {
if (buildError) {
status = 'Failed'
body += "\n\nError: ${buildError.getMessage()}"
} else {
status = 'Success'
}
email(
mail(
to: env.GIT_COMMITTER_EMAIL,
subject: "Pipeline: ${status}: ${env.JOB_NAME} (${env.BUILD_NUMBER})",
body: body