/
.gitlab-ci.yml
111 lines (102 loc) · 2.35 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
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 install -P all,dist
artifacts:
paths:
- modules/dmx-distribution/target/*.zip
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-build
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-build
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