-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
36 lines (31 loc) · 1.11 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
32
33
34
35
36
variables:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version --update-snapshots"
image: maven:3.6.3-openjdk-17
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
cache:
paths:
- .m2/repository
- target/
build:
stage: build
script:
- 'mvn $MAVEN_CLI_OPTS compile versions:display-dependency-updates'
# For merge requests do not `deploy` but only run `verify`.
# See https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
test:
stage: test
script:
- 'mvn $MAVEN_CLI_OPTS verify versions:display-dependency-updates'
# For `master` and `develop` branch run `mvn deploy` automatically.
deploy:
stage: deploy
script:
- if [ ! -f ci_settings.xml ];
then echo "CI settings missing\!";
fi
- 'mvn $MAVEN_CLI_OPTS deploy versions:display-dependency-updates -s ci_settings.xml'
only:
- master
- develop