I have a declarative script that builds a C++ application on multiple agents in parallel. A stage looks like:
stage('build') {
parallel {
stage('znsim08') {
agent { label "znsim08" }
steps {
sh '''
make
'''
recordIssues minimumSeverity: 'HIGH', tools: [gcc4(id: 'centos5-warnings', name: 'Centos 5', pattern: 'build.log')]
archiveArtifacts 'build.log'
}
}
etc.
I find that if make fails:
make[1]: *** [_gnuRelease/SINRCalculation.o] Error 1
make[1]: Leaving directory `/data/hudsonuser/workspace/gcc_all_versions/'
make: *** [../StarLibs/] Error 2
the stage still succeeds. make's exit code seems to be ignored.
What am I missing?