mirror of
https://github.com/triqs/dft_tools
synced 2024-09-12 05:38:31 +02:00
[jenkins] send email on test failure too
This commit is contained in:
parent
9c23827e01
commit
56483b2d7d
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
@ -102,6 +102,7 @@ for (int i = 0; i < osxPlatforms.size(); i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************** wrap-up */
|
/****************** wrap-up */
|
||||||
|
def error = null
|
||||||
try {
|
try {
|
||||||
parallel platforms
|
parallel platforms
|
||||||
if (keepInstall) { node("docker") {
|
if (keepInstall) { node("docker") {
|
||||||
@ -150,13 +151,13 @@ try {
|
|||||||
} }
|
} }
|
||||||
} }
|
} }
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
error = err
|
||||||
|
} finally {
|
||||||
/* send email on build failure (declarative pipeline's post section would work better) */
|
/* send email on build failure (declarative pipeline's post section would work better) */
|
||||||
if (env.BRANCH_NAME != "jenkins") emailext(
|
if ((error != null || currentBuild.currentResult != 'SUCCESS') && env.BRANCH_NAME != "jenkins") emailext(
|
||||||
subject: "\$PROJECT_NAME - Build # \$BUILD_NUMBER - FAILED",
|
subject: "\$PROJECT_NAME - Build # \$BUILD_NUMBER - FAILED",
|
||||||
body: """\$PROJECT_NAME - Build # \$BUILD_NUMBER - FAILED
|
body: """\$PROJECT_NAME - Build # \$BUILD_NUMBER - FAILED
|
||||||
|
|
||||||
$err
|
|
||||||
|
|
||||||
Check console output at \$BUILD_URL to view full results.
|
Check console output at \$BUILD_URL to view full results.
|
||||||
|
|
||||||
Building \$BRANCH_NAME for \$CAUSE
|
Building \$BRANCH_NAME for \$CAUSE
|
||||||
@ -168,11 +169,11 @@ Changes:
|
|||||||
End of build log:
|
End of build log:
|
||||||
\${BUILD_LOG,maxLines=60}
|
\${BUILD_LOG,maxLines=60}
|
||||||
""",
|
""",
|
||||||
to: 'nwentzell@flatironinstitute.org',
|
to: 'nwentzell@flatironinstitute.org, dsimon@flatironinstitute.org',
|
||||||
recipientProviders: [
|
recipientProviders: [
|
||||||
[$class: 'DevelopersRecipientProvider'],
|
[$class: 'DevelopersRecipientProvider'],
|
||||||
],
|
],
|
||||||
replyTo: '$DEFAULT_REPLYTO'
|
replyTo: '$DEFAULT_REPLYTO'
|
||||||
)
|
)
|
||||||
throw err
|
if (error != null) throw error
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user