-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins v1.6
When running a Jenkins pipeline, I have tests running on parallel machines/nodes. When tests on one parallel branch (e.g. 'partA') fail, the job does not immediately stop and fail, but the rest of the parallel branch (e.g. 'partB') still runs to completion. Then the job is marked as failed.
Here is my Jenkinsfile:
stage 'Running Job'
parallel ([
partA: {
node('nodename') {
try {
...run some tests
}
} catch (e) {
print('Caught error: ' + e)
throw e
} finally {
publishReports()
archive 'test_output/**'
}
}
},
partB: {
node('nodename') {
try {
...run other tests
}
} catch (e) {
print('Caught error: ' + e)
throw e
}
finally {
publishReports()
archive 'test_output/**'
}
}
},
failFast: true
])