Hey, guys!
I have a freestyle project. It builds an app and run tests (python, unittest). It is quite straightforward if return codes are 0 then build is successful, otherwise it is failed. Earlier I returned amount of errors and failures as a returncode to see tests results on the dashboard (passed or failed). But test results may contain failures and errors, and I want to know if there were errors on tests or they all finished, but found some bugs. Actually I need to get last build (via jenkins api) without errors, no matter if there were failures.
I've tried to look at "lastStableBuild", but it seems it sticks to "lastSuccessfulBuild". I've tried to find information about build statuses but had no success. Particularly what are criteria of each of them? Maybe it is completely wrong approach and there's a better way?