-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
80 lines (71 loc) · 1.75 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
include:
- template: Code-Quality.gitlab-ci.yml
image: gradle:6.6.1-jdk11
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
build:
stage: build
script:
- gradle --build-cache assemble
- echo $CI_BUILD_PATH
- echo $CI_PROJECT_DIR
cache:
key: "$CI_COMMIT_REF_NAME"
policy: push
paths:
- build
- .gradle
code_quality:
stage: test
allow_failure: false
variables:
CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/ci-cd/codequality:latest"
artifacts:
expose_as: 'Code Quality Report'
paths: [ gl-code-quality-report.json ]
test:
stage: test
script:
- 'gradle test jacocoTestReport'
artifacts:
when: always
expose_as: 'Jacoco Test Report'
paths:
- builds/jacoco/jacoco.xml
reports:
junit: build/test-results/test/**/TEST-*.xml
code_quality_html:
extends: code_quality
variables:
REPORT_FORMAT: html
artifacts:
expose_as: 'Code Quality Report HTML'
paths: [ gl-code-quality-report.html ]
mutation-coverage:
stage: test
script:
- 'gradle test pitest'
- 'tar -czvf build/reports/pitest.tar.gz build/reports/pitest/'
artifacts:
when: always
expose_as: 'Pitest Report'
paths:
- build/reports/pitest.tar.gz
coverage-jdk11:
stage: deploy
image: haynes/jacoco2cobertura:1.0.3
script:
- 'python /opt/cover2cover.py builds/jacoco/jacoco.xml src/main/java > builds/cobertura.xml'
- 'python /opt/source2filename.py builds/cobertura.xml'
needs: [ "test" ]
dependencies:
- test
artifacts:
expose_as: 'Coverage Report'
paths: [ builds/cobertura.xml ]
reports:
coverage_report:
coverage_format: cobertura
path: builds/cobertura.xml