KellenSunderland commented on a change in pull request #12000: Redesign
Jenkinsfiles
URL: https://github.com/apache/incubator-mxnet/pull/12000#discussion_r207962811
##########
File path: docs/Jenkinsfile
##########
@@ -58,24 +44,10 @@ try {
}
}
}
-
- // set build status to success at the end
- currentBuild.result = "SUCCESS"
-} catch (caughtError) {
- node("restricted-mxnetlinux-cpu") {
- sh "echo caught ${caughtError}"
- err = caughtError
- currentBuild.result = "FAILURE"
- }
-} finally {
- node("restricted-mxnetlinux-cpu") {
- // Only send email if master failed
- if (currentBuild.result == "FAILURE") {
- emailext body: 'Generating the website has failed. Please view the build
at ${BUILD_URL}', replyTo: '${EMAIL}', subject: '[WEBSITE FAILED] Build
${BUILD_NUMBER}', to: '${EMAIL}'
- }
- // Remember to rethrow so the build is marked as failing
- if (err) {
- throw err
- }
+,
+failure_handler: {
+ if (currentBuild.result == "FAILURE") {
+ emailext body: 'Generating the website has failed. Please view the build
at ${BUILD_URL}', replyTo: '${EMAIL}', subject: '[WEBSITE FAILED] Build
${BUILD_NUMBER}', to: '${EMAIL}'
}
}
+)
Review comment:
newline
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services