1

So I have a pipeline with multiple stages and with each stage there are couple of build job processes. When I run the pipeline and there is a failure in any one of the builds the stage fails and doesn't build the other builds in the stage. How can I get around this so it builds the remaining jobs in the stage?

guylifestyle
  • 317
  • 1
  • 6
  • 13

1 Answers1

1

you can use the convention

try {
    // your build steps
    } finally {
        // always run...
    }
Amityo
  • 5,635
  • 4
  • 22
  • 29
  • This doesn't work @AmitYogev `node('ssp') { parallel("stream 1" : { stage('build') { for (item in build) { try{ buildJob(item) } catch (e) { throw e } } } }, "stream 2 (stream 2)" : { stage('test') { for (item in Tests) { try{ buildJob(item) } catch (e) { throw e } } } } )} ` – guylifestyle Dec 05 '16 at 18:28
  • 2
    the step stops because you throw the exception. try not throwing e and the next step will start – Amityo Dec 06 '16 at 08:34