-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
63 lines (56 loc) · 1.77 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
image: maven:3-jdk-11
stages:
- build
- customize
variables:
MAVEN_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Dmaven.repo.local=.m2/repository"
GIT_STRATEGY: fetch
GIT_DEPTH: 50
.ear-upload: &ear-upload
after_script:
- mv src/ear/target/eaas-server.ear .
artifacts:
paths:
- eaas-server.ear
.maven-cache: &maven-cache
needs:
- job: standalone-server-build
artifacts: false
cache:
key: maven-repo
policy: pull
paths:
- .m2/repository
# build standalone configuration and update maven's cache
standalone-server-build:
stage: build
script:
- mvn -f src/pom.xml clean package -Dskip-docs=false -T1C
- ./ci/scripts/upload-api-docs.sh
"emil:${PWD}/src/emil/target/apidocs"
"dig-pub-sharing:${PWD}/src/dig-pub-sharing/target/apidocs"
"metadata-oaipmh:${PWD}/src/metadata-oaipmh/server/target/apidocs"
<<: *ear-upload
cache:
key: maven-repo
policy: pull-push
paths:
- .m2/repository
# build gateway configuration
gateway-build:
stage: customize
script:
- echo 'git.commit.id=${git.commit.id.abbrev}-false' > src/common/src/main/resources/eaas-version.properties
- cp -f src/ear/src/main/application/META-INF/{deployment-gateway.xml,jboss-deployment-structure.xml}
- mvn -f src/pom.xml clean package -P '!emucomp' -pl ear -am -T1C
<<: *ear-upload
<<: *maven-cache
# build emucomp configuration
emucomp-build:
stage: customize
script:
- echo 'git.commit.id=${git.commit.id.abbrev}-false' > src/common/src/main/resources/eaas-version.properties
- cp -f src/ear/src/main/application/META-INF/{deployment-emucomp.xml,jboss-deployment-structure.xml}
- mvn -f src/pom.xml clean package -P emucomp,imagearchive,blobstore -pl ear -am -T1C
<<: *ear-upload
<<: *maven-cache