hi All, Do anybody have an example or a pointer to how one could terminate a parallel pipeline section on first failure?
The use case is that I have 14 tests in a checkin regression pipeline. Some tests take 2 min some take 40 min. To speed up feedback to the users we want to give feed back ASAP if a test did fail. My test pipeline is: stage('tests') { parallel 'longTests': { build job: 'testjob1', quietPeriod: 0 }, 'shortTests':{ // this will fail 1 sec build job: 'testjob2', quietPeriod: 0 } } My current "pipeline" (Build-flow) is able to do this with a ugly hack: import static hudson.model.Result.FAILURE import groovy.time.* parallel ( { b = build("testjob1") if (b.getResult().toString() != "SUCCESS") { upstream.getExecutor().interrupt(FAILURE) } }, { b = build("testjob2"]) if (b.getResult().toString() != "SUCCESS") { upstream.getExecutor().interrupt(FAILURE) } } ) Regard, Asmund -- 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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CA%2BzfM3Bq0x7djYpWaXfvSbHrFf2DuGJeZ8fEsVskT%3DDfTeKq2w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.