Compare commits
2 Commits
69bbceacfe
...
9fdea31a98
Author | SHA1 | Date |
---|---|---|
黄昕 | 9fdea31a98 | |
黄昕 | daa09beec6 |
|
@ -1,6 +1,7 @@
|
||||||
# 本次构建的阶段: compile、package、deploy
|
# 本次构建的阶段: compile、package、deploy
|
||||||
stages :
|
stages :
|
||||||
- sonarqube-check
|
- sonarqube-check
|
||||||
|
- coverage
|
||||||
- compile
|
- compile
|
||||||
- integration-test
|
- integration-test
|
||||||
- package
|
- package
|
||||||
|
@ -26,11 +27,30 @@ sonarqube-check :
|
||||||
- main
|
- main
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
# Must be in a stage later than test-jdk11's stage.
|
||||||
|
# The `visualize` stage does not exist by default.
|
||||||
|
# Please define it first, or choose an existing stage like `deploy`.
|
||||||
|
stage: coverage
|
||||||
|
tags:
|
||||||
|
- linux-maven
|
||||||
|
image: registry.gitlab.com/haynes/jacoco2cobertura:1.0.7
|
||||||
|
script:
|
||||||
|
# convert report from jacoco to cobertura, using relative project path
|
||||||
|
- python /opt/cover2cover.py target/site/jacoco/jacoco.xml $CI_PROJECT_DIR/src/main/java/ > target/site/cobertura.xml
|
||||||
|
needs: ["sonarqube-check"]
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
coverage_report:
|
||||||
|
coverage_format: cobertura
|
||||||
|
path: target/site/cobertura.xml
|
||||||
|
|
||||||
# 编译
|
# 编译
|
||||||
compile :
|
compile :
|
||||||
stage : compile
|
stage : compile
|
||||||
tags :
|
tags :
|
||||||
- linux-maven
|
- linux-maven
|
||||||
|
needs: ["coverage"]
|
||||||
only :
|
only :
|
||||||
- master
|
- master
|
||||||
script:
|
script:
|
||||||
|
@ -59,6 +79,7 @@ package :
|
||||||
stage : package
|
stage : package
|
||||||
tags :
|
tags :
|
||||||
- linux-maven
|
- linux-maven
|
||||||
|
needs: ["coverage"]
|
||||||
only :
|
only :
|
||||||
- master
|
- master
|
||||||
script:
|
script:
|
||||||
|
|
Loading…
Reference in New Issue