-
Notifications
You must be signed in to change notification settings - Fork 27
/
.gitlab-ci.yml
132 lines (121 loc) · 2.79 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# A temporary fix for accessing the local docker repo is to unset $DOCKER_AUTH_CONFIG
variables:
DOCKER_AUTH_CONFIG:
stages:
- build
- deploy
- trigger
maven-build:
image: container-registry.dmx.systems/dmx-intern/docker-images/maven-npm-nodejs
stage: build
tags:
- docker
script:
- export MAVEN_OPTS="-Xmx512m"
- node -v
- npm -v
- mvn clean test -P all,dist
artifacts:
paths:
- modules/*/target/
maven-install:
image: container-registry.dmx.systems/dmx-intern/docker-images/maven-npm-nodejs
stage: build
tags:
- docker
script:
- export MAVEN_OPTS="-Xmx512m"
- mvn install -P all,dist
artifacts:
paths:
- modules/dmx-distribution/target/*.zip
dependencies:
- maven-build
only:
- master
- main
javadoc:
image: container-registry.dmx.systems/dmx-intern/docker-images/maven-npm-nodejs
stage: build
tags:
- docker
script:
- export JAVA_HOME="/usr/lib/jvm/java-11-openjdk"
- export MAVEN_OPTS="-Xmx512m"
- mvn --version
- mvn -P all javadoc:aggregate
- zip -r target/apidocs.zip target/site/apidocs
artifacts:
paths:
- target/*
only:
- master
- main
publish-apidocs:
stage: deploy
tags:
- shell
script:
- ci-publish-apidocs.sh
dependencies:
- javadoc
only:
- master
- main
publish-snapshot:
stage: deploy
tags:
- shell
script:
- ci-publish.sh snapshot
dependencies:
- maven-install
rules:
- if: $CI_COMMIT_BRANCH == 'master' && $CI_COMMIT_TAG == null && $CI_PIPELINE_SOURCE != 'merge_request_event'
- if: $CI_COMMIT_BRANCH == 'main' && $CI_COMMIT_TAG == null && $CI_PIPELINE_SOURCE != 'merge_request_event'
publish-release:
stage: deploy
tags:
- shell
script:
- ci-publish.sh release
dependencies:
- maven-install
rules:
- if: $CI_COMMIT_BRANCH == 'master' && $CI_COMMIT_TAG != null && $CI_PIPELINE_SOURCE != 'merge_request_event'
- if: $CI_COMMIT_BRANCH == 'main' && $CI_COMMIT_TAG != null && $CI_PIPELINE_SOURCE != 'merge_request_event'
deploy-to-gitlab-maven:
image: container-registry.dmx.systems/dmx-intern/docker-images/maven-npm-nodejs
stage: deploy
tags:
- docker
script:
- 'mvn -Pall,gitlab-maven-deployment deploy -DskipTests=true -s /usr/local/lib/ci_settings.xml'
only:
- master
- main
- dm4
deploy-to-central:
image: container-registry.dmx.systems/dmx-intern/docker-images/maven-npm-nodejs
stage: deploy
tags:
- docker
script:
- export MAVEN_OPTS="-Xmx512m"
- mvn clean deploy -P release
only:
- tags
trigger-deb-project:
stage: trigger
trigger: dmx-platform/dmx-build-deb
only:
- master
except:
- tags
trigger-docker-project:
stage: trigger
trigger: dmx-contrib/dmx-docker
only:
- master
except:
- tags