Everything is based on the final process’s exit code . . . exit 0 is pass, exit 
anything else is fail.

So in windows you could do something like this at the end of your script:

IF %ERRORLEVEL% ==0 EXIT 1
EXIT 0

Unix must have some equivalent.

Frank

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Tj Sebastian
Sent: Monday, January 21, 2013 12:47 PM
To: jenkinsci-users@googlegroups.com
Subject: --wip trouble


Currently one of our Jenkins builds fails. I would like it to pass (or show 
green) when the build fails. At the same rate i would like our build to fail 
(or show red) when a case passes. The build I am configuring is our “Known 
Issues Build”. So only failed cases go in there. The goal of this build is for 
it to pass when it fails, since we know it’s broken. When our devs fix it the 
build should fail (which means something is working now) so that we may move it 
out of the build into our core build. I read an article on the --wip switch and 
have successfully configured that into our build. I have been receiving emails 
that say Jenkins build is back to normal, which to me seems like it worked. 
However, when you look in the build itself it looks as if it fails. The build 
is flagged as red, which means it failed, and the tests say they failed. The 
only indicator they passed is the email I receive. But this is not the intended 
behavior i am going for. The build seems to alert me that it passes but looks 
as if it fails. Is there a way i can make the red button go green, so when we 
look at our builds, we know when something is wrong.

Reply via email to