-
Notifications
You must be signed in to change notification settings - Fork 291
/
.gitlab-ci.yml
68 lines (63 loc) · 1.65 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
image: "docker/compose:1.28.5"
services:
- docker:dind
stages:
- build
- test
- coverage
build:
stage: build
script:
- cd docker/build
- docker-compose up
artifacts:
paths:
- release/
expire_in: 20 minutes
test:
stage: test
needs: ["build"]
dependencies:
- build
before_script:
- sh test.sh clean_ci
script:
- sh test.sh ci
after_script:
- sh test.sh clean_ci
artifacts:
when: always
reports:
junit:
- rpc/target/surefire-reports/TEST-*.xml
- mpc/target/surefire-reports/TEST-*.xml
- data/target/surefire-reports/TEST-*.xml
- plan/target/surefire-reports/TEST-*.xml
- owner/target/surefire-reports/TEST-*.xml
- user/target/surefire-reports/TEST-*.xml
paths:
- coverage/target/site/*
expire_in: 2 day
coverage:
stage: coverage
image: registry.gitlab.com/haynes/jacoco2cobertura:1.0.7
script:
- cat coverage/target/site/jacoco-aggregate/index.html
- 'python /opt/cover2cover.py coverage/target/site/jacoco-aggregate/jacoco.xml
$CI_PROJECT_DIR/rpc/src/main/java/
$CI_PROJECT_DIR/mpc/src/main/java/
$CI_PROJECT_DIR/data/src/main/java/
$CI_PROJECT_DIR/plan/src/main/java/
$CI_PROJECT_DIR/owner/src/main/java/
$CI_PROJECT_DIR/user/src/main/java/
> coverage/target/site/coverage.xml'
needs: ["test"]
dependencies:
- test
coverage: '/Total.*?([0-9]{1,3})%/'
artifacts:
expire_in: 2 day
reports:
cobertura: coverage/target/site/coverage.xml
paths:
- coverage/target/site/jacoco-aggregate/index.html