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 behaviour 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.
Right now I added || exit 1
to the end of my command which is supposed to reverse the failed and passed flags. I also created a short bash script to reverse the button color, which also did not work. I believe i am missing something. Any ideas? Listed below is the command I am running to launch our build:
cucumber --wip --profile wip --format json -o cucumber.json /var/lib/jenkins/workspace/Cucumber\ -\ Known\ Issues\ Build/ SITE=devel || exit 1