Consider this extract from my declarative syntax Jenkinsfile
stage("Test") {
steps {
sh "sh run-tests.sh"
}
}
Even though the run-tests.sh
script exit with code 1, the Jenkins job execution continues to the next step. Does anyone know what may be causing this?
EDIT: Thanks for the replies so far. I believe the problem lies elsewhere - the tests being executes are initiated by Python's nose2
library, and if I'm not mistaking it's this command that exits with 0 regardless of the status of the tests. I'll follow that lead for now and see if that solves things.