In this i have requirement to trigger my job with 3 iterations (below example 3) without waiting, but after all 3 jobs were triggered this has to wait until all 3 jobs have successfully finished irrespective of fail or pass.
I am using wait:true but that will wait for each iteration, thats not i want.
If I use wait:false , it's not waiting once all iterations in loop has completed, its not waiting for the downstream jobs to finish. I want the current job to wait until i got result of jobs (3 pipelines).
//job1 is a pipeline job which i am triggering multiple times with different params
stage {
for(int cntr=0;i<3;i++) {
build job : "job1",
parameters: [string(name: 'param1', value:val[cntr] )],
wait: false
}
}