Hello all !
I'm playing with Jenkins Workflow and am wondering how I can send a basic
mail telling the team the build has failed.
What I would really like is something like the "email notification" step
with option "Send e-mail for every unstable build" in the classic jobs.
Please detail if this must be defined inside a node or outside.
I tried the following as a test but it seem to stuck my build...
Do I have to put the try/catch inside each and every node() of my workflow ?
try {
node {
sh 'might fail'
}
} catch (e) {
def w = new StringWriter()
e.printStackTrace(new PrintWriter(w))
mail subject: "failed with ${e.message}", to: 'admin@somewhere', body:
"Failed: ${w}"
throw e
}
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/2277e964-e969-4670-a489-6394973f2377%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.