Update and clarify the Maven CI template
What does this MR do and why?
-
Leverage YAML Block with newline chomping, e.g.,
FOO: >-
. Per §8.1.1.2 Block Chomping Indicator of the YAML specification:Chomping controls how final line breaks and trailing empty lines are interpreted.
This makes the
MAVEN_OPTS
andMAVEN_CLI_OPTS
readable and approachable. -
Remove the use of
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener
in favor of Maven's--no-transfer-progress
option. Available since Maven 3.6. -
Upgrade the Maven
image
use Maven 3.8.6 (latest) on Java 8 LTS. -
Use
extends
, a GitLab feature, over YAML Anchors. -
Userules
in favor ofonly
andexcept
. Usingrules
is the preferred GitLab feature.
Screenshots or screen recordings
Pipeline from test project is here.
How to set up and validate locally
- Copy the contents of the provided
Maven.gitlab.yml
file. - Paste the contents of the
Maven.gitlab.yml
file in a new.gitlab-ci.yml
- Commit, push, or otherwise execute the pipeline.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.