Trying to find the answer why it doesn't work for case when I use def
jobBuild = build job: 'myjob', propagate: false,
*wait:false*
On Wednesday, May 17, 2017 at 12:55:33 PM UTC+3, Bill Dennis wrote:
>
> Ah just saw you need the job to call all builds even if one fails. You can
> do it with a pa
Thanks Bill - appreciate the response.
I found that not propagating the errors was the key - it would continue
onto further tasks nicely if I did that. Only issue really is that if you
watch the pipeline in Jenkins then it appears to show all green even if a
step has failed.
My build summary e
So I was trying too hard - the try/catch isnt' needed at all.
All I needed was:
BuildResults = build job: 'testJob', propagate: false;
notify_email(BuildResults);
On Wednesday, May 17, 2017 at 10:45:27 AM UTC+8, Jesse Kinross-Smith wrote:
>
> How can I do this right - I want the results from a
Ah just saw you need the job to call all builds even if one fails. You can
do it with a parallel section like this:
Map buildResults = [:]
Boolean failedJobs = false
void nofify_email(Map results) {
echo "TEST SIMULATE notify: ${results.toString()}"
}
Boolean buildJob(String jobName, Map r
You could build the downstream jobs without propagating the error to the
top level job calling them.
Then you could get the results from each downstream job and handle it to do
the notifications according to SUCCESS/FAILURE/UNSTABLE etc.
I do this sort of thing using declarative pipeline then I
How can I do this right - I want the results from a job I run (I need to
run a dozen of these in succession and will email devs if one of them
fails)
try{ BuildResults = build job: 'testJob'; currentBuild.result='SUCCESS'; }
> catch(e){ currentBuild.result = 'FAILURE'; } finally {
> notify_em