-
New Feature
-
Resolution: Fixed
-
Minor
-
Jenkins 1.572
Currently, users of "Execute shell" builds must fetch the jenkins-cli jar and execute it in order to mark a build as unstable. For example:
set -e
wget ${JENKINS_URL}jnlpJars/jenkins-cli.jar
make
if ! make check; then
java -jar jenkins-cli.jar set-build-result unstable && exit 0
exit 1
fi
will flag as unstable and exit.
That works, but it's a right pain. The alternative is text-finder plugin string matching, which is arguably worse.
What'd be ideal is to let the return code 2 mean "unstable" to Jenkins. So one could just replace the above with:
set -e make make check || exit 2
I'll see what's involved in adding this, but wanted to put the idea out.
- depends on
-
JENKINS-23896 PATCH: CommandInterpreter.join(...) doesn't have access to the Build object
- Open
- is duplicated by
-
JENKINS-28312 Make a job unstable by giving a specific exit code
- Resolved
- is related to
-
JENKINS-39164 CommandInterpreter return value fix: causes incompatibility with Env-inject plugin in Jenkins v2.26
- Resolved
- relates to
-
JENKINS-47606 Postbuild Steps for 'Success' still execute when using shell step's unstable return
- Open