-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
101 lines (91 loc) · 2.42 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# 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:17-alpine
cache:
paths:
- ~/.m2/repository
stages:
- test
- build
- deploy
.release_rules:
rules:
- if: $CI_COMMIT_TAG =~ /^\d+.\d+.\d+/ # describe how your version tags look like!
# Verify merge requests
test:
stage: test
tags:
- privileged
before_script:
- apk update
- apk add apache-ant
- apk add unzip
script:
- ./mvnw verify
- target/bin/test.sh
# build-frontend:
# stage: build
# image: harbor.uni-muenster.de/proxy-docker/library/node:21-alpine
# cache:
# key:
# files:
# - package-lock.json
# prefix: npm
# paths:
# - node_modules/
# before_script:
# - apk update
# - apk add wget
# script:
# - cd frontend
# - echo "//${CI_SERVER_HOST}/api/v4/projects/805/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> .npmrc
# - cat .npmrc
# - ./install-via-api.sh
# - ls -l node_modules
# - ls -l node_modules/@scdh
# - npm run build
# artifacts:
# paths:
# - frontend/dist
# 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
tags:
- privileged
before_script:
- apk update
- apk add apache-ant
- apk add unzip
script:
- ./mvnw -Drevision=$CI_COMMIT_TAG -Dchangelist="" verify
- ./mvnw -Drevision=$CI_COMMIT_TAG -Dchangelist="" -Pseed-config package
- 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
before_script:
- apk update
- apk add apache-ant
- apk add unzip
script:
- mkdir -p public
- ls -la
- unzip target/*-package.zip -d public
- cp -v target/*-package.zip 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 ]