Jenkinsfile fix: Task fails when gets an error sending email
This commit is contained in:
parent
114c9ded7f
commit
ad03d1edf7
|
@ -97,11 +97,15 @@ pipeline {
|
|||
always {
|
||||
script {
|
||||
if (!env.GIT_COMMITTER_EMAIL) return
|
||||
mail(
|
||||
to: env.GIT_COMMITTER_EMAIL,
|
||||
subject: "Pipeline: ${env.JOB_NAME} (${env.BUILD_NUMBER}): ${currentBuild.currentResult}",
|
||||
body: "Check status at ${env.BUILD_URL}"
|
||||
)
|
||||
try {
|
||||
mail(
|
||||
to: env.GIT_COMMITTER_EMAIL,
|
||||
subject: "Pipeline: ${env.JOB_NAME} (${env.BUILD_NUMBER}): ${currentBuild.currentResult}",
|
||||
body: "Check status at ${env.BUILD_URL}"
|
||||
)
|
||||
} catch (e) {
|
||||
echo e.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue