Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
shimonran authored Jan 24, 2018
1 parent 2bf0252 commit b938fbe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ node ('nps-server-14') {
stage 'Build'
sh 'make all'
} catch (e) {
echo "Build failed"
currentBuild.result = "FAILED"
mail to:"[email protected]", subject:"FAILURE: ${currentBuild.fullDisplayName}", body: "Boo, we failed."
} finally {
echo "Build success"
if ( currentBuild.getPreviousBuild().getResult().equals("FAILED") ) {
echo "Build success after fail"
mail to:"[email protected]", subject:"SUCCESS: ${currentBuild.fullDisplayName}", body: "Yay, we returned to success."
}
}
echo "Finished"
}

0 comments on commit b938fbe

Please sign in to comment.