When I run an Execute shell build step to execute a script and that script returns 0, Jenkins flags the build as SUCCESS, oth
Execute shell
0
Jenkins
SUCCESS
/path/to/myscript.sh || if [ "$?" == "$EXPECTED_EXIT_CODE" ]; then continue; else exit 1; fi
I would use continue instead of exit 0 in case you have other items below that you need to run through.