I am using a Jenkins pipeline to run several long duration simulations. In case there is a compilation error or warning, the simulators exit with 1 or -1, due to which the Jenkins build status will be set to FAILURE. I use JUnit to find issues post-simulation in the simulation logs. In case failure patterns are detected in the .xml outputs, the build status will be set to UNSTABLE.
Other parts of the testing pipeline require currentBuild.result to be FAILURE in the latter case as well however. Is there a way to upgrade the UNSTABLE status to FAILURE via “always” as the last step of every pipeline?
If this isn’t possible in the Jenkins YAML, is it possible via some workaround? Or should I modify my scripts in a way that they can predict an UNSTABLE state and exit with 1 or -1?
Appreciate the help in advance!
- Project language: SystemVerilog/UVM
- Scripting: tcsh/Python
- Jenkins runs tcsh script that starts all simulations.
- I’m a complete Jenkins noob, I’m happy I even got the script set up.
- I looked online, and all information I found was regarding changing UNSTABLE to SUCCESS, which is categorically impossible. However as far as I know downgrading the result to FAILURE is possible, I just couldn’t find any info on whether there is an easy way to do it or not.