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?
            Asked
            
        
        
            Active
            
        
            Viewed 3,738 times
        
    1 Answers
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
 - 
                    2the step stops because you throw the exception. try not throwing e and the next step will start – Amityo Dec 06 '16 at 08:34