Prevent installing an already installed Java version
What does this MR do?
SDKMAN introduced a breaking change in 5.3.4 where it now exits with exit code 1 when trying to install
a version that's already installed. We were relying on this by chaining the source && install && default
commands, but now it fails and doesn't get to default
anymore, thus not setting the proper Java version.
P.S: I did some basic tests on this branch for the following:
- Java 11 - successful job
- Java 8 - successful job
- Invalid Java version - successful job with the invalid warning and fallback to 8
What are the relevant issue numbers?
gitlab-org/gitlab#205696 (closed)
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
Edited by Catalin Irimie