Re: Workflow : how to send a basic "build failed" mail

2015-09-14 Thread Michael Neale
great - however (as commented in the ticket) it still isn't that friendly to use compared to sending a "positive" email. On Monday, September 14, 2015 at 11:57:06 PM UTC+10, Jesse Glick wrote: > > On Monday, September 14, 2015 at 7:42:13 AM UTC-4, Michael Neale wrote: >> >> is there no way to ha

Re: Workflow : how to send a basic "build failed" mail

2015-09-14 Thread Jesse Glick
On Monday, September 14, 2015 at 7:42:13 AM UTC-4, Michael Neale wrote: > > is there no way to have an on failure handler (perhaps for all steps) vs a > per node or global catch/print writer? > JENKINS-28119 -- You received this message beca

Re: Workflow : how to send a basic "build failed" mail

2015-09-14 Thread Michael Neale
Interesting - is there no way to have an on failure handler (perhaps for all steps) vs a per node or global catch/print writer? (whilst it works it seems to be more work for a common enough desire for failure messages, making me think there is probably another way). On Friday, September 11, 20

Re: Workflow : how to send a basic "build failed" mail

2015-09-10 Thread Francois Marot
Thanks Victor, so in fact what worked was creating a new node() {...} block to wrap my whole workflow and inside it I now have a LARGE try / catch and I send the failure mail in the catch block. I did not know I could nest node() {...} blocks but it seems to work. In the ends, I got this workin

Re: Workflow : how to send a basic "build failed" mail

2015-09-09 Thread Victor Martinez
Hi, Have you tried something like? node { sh 'might fail' mail (to: 'admin@somewhere', subject: "Job '${env.JOB_NAME}' (${env.BUILD_NUMBER}) failed!", body: "Your job failed, please review it ${env.BUILD_URL}."); } Cheers On Wednesday, 9 September 2015 11:24:18

Workflow : how to send a basic "build failed" mail

2015-09-09 Thread Francois Marot
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