-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
40 lines (34 loc) · 923 Bytes
/
.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
32
33
34
35
36
37
38
39
40
image: maven:3.8.7-openjdk-18-slim
variables:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=.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"
SKIP_TESTS: "-DskipTests=true -Djacoco.skip=true"
cache:
paths:
- .m2/repository/
stages:
- build
- test
- deploy
maven-build:
stage: build
script:
- 'mvn $MAVEN_CLI_OPTS package $SKIP_TESTS'
artifacts:
paths:
- target/
expire_in: 30 mins
unit-test:
stage: test
script:
- 'mvn $MAVEN_CLI_OPTS surefire:test'
artifacts:
paths:
- target/*.jar
expire_in: 30 mins
release-package:
stage: deploy
rules:
- if: $CI_COMMIT_TAG
script:
- 'mvn $MAVEN_CLI_OPTS deploy $SKIP_TESTS -s ci_settings.xml'