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
-
Update sast
with newFAIL_NEVER
flag (gitlab-org/security-products/sast!149 (merged)) -
Update gitlab-ce
template to propagateFAIL_NEVER
(https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/30331)
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ee/issues/10564
Does this MR meet the acceptance criteria?
-
Changelog entry added - [-] Documentation created/updated for GitLab EE, if necessary
- [-] Documentation created/updated for this project, if necessary
- [-] Documentation reviewed by technical writer or follow-up review issue created
-
Tests added for this feature/bug -
Job definition updated, if necessary -
Auto-DevOps template (also in CE) -
Job definition example -
CI Templates (to be removed) -
Vendored CI Templates (also in CE)
-
-
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer