Skip to content

10564 return non zero exit code on build failure

What does this MR do?

Changes default behavior of spotbugs to return non-zero exit code if compilation fails. This is a breaking change but unexpected behavior, so I'm going with a point-bump. Additionally, perhaps this behavior is desired, so I moved the previous behavior behind a flag, FAIL_NEVER, to emulate the similar maven flag.

Actually, this change is a bit more drastic than just fixing the return code: unless FAIL_NEVER is true, the analyzer stage will return early and not attempt a scan, however this seems more intuitive (IMO) so I'm going with the shorter description.

I feel like this is also an ongoing discussion but debated namespacing FAIL_NEVER to something like SPOTBUGS_FAIL_NEVER, however that's incongruent with existing spotbugs flags and (eventually) should be unnecessary with the removal of DinD as variable scoping within jobs will be more obvious.

TODO

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ee/issues/10564

Does this MR meet the acceptance criteria?

Edited by Lucas Charles

Merge request reports