-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
61 lines (52 loc) · 1.49 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# based on the template from
# https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/lib/gitlab/ci/templates/Maven.gitlab-ci.yml
# image: openjdk:17 # openjdk:* is deprecated! See https://hub.docker.com/_/openjdk
## we use a proxied docker image in order to not run into a pull rate limit
image: harbor.uni-muenster.de/proxy-docker/library/eclipse-temurin:21-alpine
cache:
paths:
- ~/.m2/repository
stages:
- test
- deploy
.release_rules:
rules:
- if: $CI_COMMIT_TAG =~ /^\d+.\d+.\d+/ # describe how your version tags look like!
before_script:
- apk update
- apk add apache-ant
- apk add unzip
# Verify merge requests
test:
stage: test
script:
- ./mvnw verify
- target/bin/test.sh
# deploy using ci_settings.xml as maven settings
# see https://gitlab.com/help/user/packages/maven_repository/index.md#creating-maven-packages-with-gitlab-cicd-using-maven
push-packages:
stage: deploy
script:
- ./mvnw -Drevision=$CI_COMMIT_TAG -Dchangelist="" verify
- target/bin/test.sh
- ./mvnw -Drevision=$CI_COMMIT_TAG -Dchangelist="" deploy -s ci_settings.xml
artifacts:
paths:
- target
rules:
- !reference [ .release_rules, rules ]
pages:
stage: deploy
script:
- mkdir -p public
- ls -la
- unzip target/*-package.zip -d public
- cp -v target/descriptor.xml public/
- cp -v target/*-oxygen-distribution.jar public/
needs:
- push-packages
artifacts:
paths:
- public
rules:
- !reference [ .release_rules, rules ]