Gitlab ci docs
This commit is contained in:
parent
f358c305ee
commit
65398e5db7
@ -22,8 +22,8 @@ cache:
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- coverage
|
||||
- report
|
||||
- docs
|
||||
- postprocessing
|
||||
- deploy
|
||||
|
||||
build:
|
||||
@ -49,47 +49,45 @@ unittest:
|
||||
- target/failsafe-reports/TEST-*.xml
|
||||
|
||||
generate-coverage:
|
||||
stage: coverage
|
||||
stage: docs
|
||||
script:
|
||||
- 'mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent test jacoco:report'
|
||||
- 'mvn clean jacoco:prepare-agent test jacoco:report'
|
||||
- 'cat target/site/jacoco/index.html'
|
||||
coverage: '/Total.*?([0-9]{1,3})%/'
|
||||
artifacts:
|
||||
paths:
|
||||
- target/site/
|
||||
- target/site/jacoco/jacoco.xml
|
||||
- target/site/jacoco
|
||||
|
||||
report-coverage:
|
||||
stage: report
|
||||
process-coverage:
|
||||
stage: postprocessing
|
||||
image: haynes/jacoco2cobertura:1.0.4
|
||||
needs: [generate-coverage]
|
||||
script:
|
||||
# convert report from jacoco to cobertura
|
||||
- 'python /opt/cover2cover.py target/site/jacoco/jacoco.xml src/main/java > target/site/cobertura.xml'
|
||||
# read the <source></source> tag and prepend the path to every filename attribute
|
||||
- 'python /opt/source2filename.py target/site/cobertura.xml'
|
||||
needs: [generate-coverage]
|
||||
artifacts:
|
||||
reports:
|
||||
cobertura: target/site/cobertura.xml
|
||||
|
||||
generate-apidocs:
|
||||
stage: docs
|
||||
script:
|
||||
- 'mvn clean javadoc:javadoc'
|
||||
artifacts:
|
||||
paths:
|
||||
- target/site/apidocs
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
needs: [generate-coverage]
|
||||
needs: [generate-coverage, generate-apidocs]
|
||||
script:
|
||||
- mv target/site/* public/
|
||||
- mv target/site/jacoco public/
|
||||
- mv target/site/apidocs public/
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
expire_in: 30 days
|
||||
only:
|
||||
- master
|
||||
|
||||
# integrationtest-job:
|
||||
# stage: test
|
||||
# dependencies:
|
||||
# - build-job
|
||||
# script:
|
||||
# - "mvn verify $MAVEN_CLI_OPTS"
|
||||
# artifacts:
|
||||
# paths:
|
||||
# - target/
|
||||
- master
|
Loading…
Reference in New Issue
Block a user