-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
57 lines (52 loc) · 1.23 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
stages:
- verify
- validate
- visualize
- package
compile-jdk17:
stage: verify
image: amd64/openjdk:17-jdk-bullseye
script:
- ./gradlew build
compile-jdk21:
stage: verify
image: amd64/openjdk:21-jdk-bullseye
script:
- ./gradlew build
test:
stage: validate
image: amd64/openjdk:17-jdk-bullseye
script:
- ./gradlew check jacocoTestReport
needs: [ "compile-jdk17" ]
artifacts:
reports:
junit: build/test-results/test/**/TEST-*.xml
paths:
- build/reports/jacoco/test/jacocoTestReport.xml
coverage: '/Branch coverage: \d+\.\d+/'
coverage:
stage: visualize
image: registry.gitlab.com/haynes/jacoco2cobertura:1.0.10
script:
- python /opt/cover2cover.py build/reports/jacoco/test/jacocoTestReport.xml $CI_PROJECT_DIR/src/main/kotlin/ > build/cobertura.xml
needs: [ "test" ]
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: build/cobertura.xml
allow_failure: true
jar:
stage: package
image: amd64/openjdk:17-jdk-bullseye
script:
- apt-get update
- apt-get install -y gettext
- ./gradlew dist generatePot
needs: [ "test" ]
artifacts:
paths:
- build/dist/*.jar
- build/i18n/pot/*.pot
expire_in: 1 week