-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
31 lines (27 loc) · 1.17 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# See https://gitlab.com/gitlab-org/gitlab-ci-yml/blob/master/Maven.gitlab-ci.yml
variables:
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
cache:
paths:
- .m2/repository
validate:
stage: build
image: maven:3.8.7-eclipse-temurin-17-alpine
script:
- mvn $MAVEN_CLI_OPTS test-compile
verify:
stage: test
image: maven:3.8.7-eclipse-temurin-17-alpine
script:
- mvn $MAVEN_CLI_OPTS verify
artifacts:
when: always
reports:
junit:
- ./*/target/surefire-reports/TEST-*.xml
- ./*/target/failsafe-reports/TEST-*.xml