Fix gitlab-ci paths
This commit is contained in:
parent
59527db7dd
commit
8bd35273db
|
@ -45,10 +45,11 @@ stages:
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
|
- "cd oysteikt-calc"
|
||||||
- "mvn clean compile $MAVEN_CLI_OPTS"
|
- "mvn clean compile $MAVEN_CLI_OPTS"
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- target/
|
- oysteikt-calc/target/
|
||||||
|
|
||||||
unittest:
|
unittest:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -56,39 +57,42 @@ unittest:
|
||||||
script:
|
script:
|
||||||
- "apt update"
|
- "apt update"
|
||||||
- "apt install -y openjfx"
|
- "apt install -y openjfx"
|
||||||
|
- "cd oysteikt-calc"
|
||||||
- "mvn package $MAVEN_CLI_OPTS"
|
- "mvn package $MAVEN_CLI_OPTS"
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- target/
|
- oysteikt-calc/target/
|
||||||
when: always
|
when: always
|
||||||
reports:
|
reports:
|
||||||
junit:
|
junit:
|
||||||
- target/surefire-reports/TEST-*.xml
|
- oysteikt-calc/target/surefire-reports/TEST-*.xml
|
||||||
|
|
||||||
generate-coverage:
|
generate-coverage:
|
||||||
stage: docs
|
stage: docs
|
||||||
script:
|
script:
|
||||||
- "apt update"
|
- "apt update"
|
||||||
- "apt install -y openjfx"
|
- "apt install -y openjfx"
|
||||||
|
- "cd oysteikt-calc"
|
||||||
- 'mvn clean jacoco:prepare-agent test $MAVEN_CLI_OPTS jacoco:report'
|
- 'mvn clean jacoco:prepare-agent test $MAVEN_CLI_OPTS jacoco:report'
|
||||||
- 'cat target/site/jacoco/index.html'
|
- 'cat target/site/jacoco/index.html'
|
||||||
coverage: '/Total.*?([0-9]{1,3})%/'
|
coverage: '/Total.*?([0-9]{1,3})%/'
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- target/site/jacoco
|
- oysteikt-calc/target/site/jacoco
|
||||||
|
|
||||||
process-coverage:
|
process-coverage:
|
||||||
stage: postprocessing
|
stage: postprocessing
|
||||||
image: haynes/jacoco2cobertura:1.0.4
|
image: haynes/jacoco2cobertura:1.0.4
|
||||||
needs: [generate-coverage]
|
needs: [generate-coverage]
|
||||||
script:
|
script:
|
||||||
|
- "cd oysteikt-calc"
|
||||||
# convert report from jacoco to cobertura
|
# convert report from jacoco to cobertura
|
||||||
- 'python /opt/cover2cover.py target/site/jacoco/jacoco.xml src/main/java > target/site/cobertura.xml'
|
- '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
|
# read the <source></source> tag and prepend the path to every filename attribute
|
||||||
- 'python /opt/source2filename.py target/site/cobertura.xml'
|
- 'python /opt/source2filename.py target/site/cobertura.xml'
|
||||||
artifacts:
|
artifacts:
|
||||||
reports:
|
reports:
|
||||||
cobertura: target/site/cobertura.xml
|
cobertura: oysteikt-calc/target/site/cobertura.xml
|
||||||
|
|
||||||
# generate-apidocs:
|
# generate-apidocs:
|
||||||
# stage: docs
|
# stage: docs
|
||||||
|
@ -103,7 +107,7 @@ pages:
|
||||||
# needs: [generate-coverage, generate-apidocs]
|
# needs: [generate-coverage, generate-apidocs]
|
||||||
needs: [generate-coverage]
|
needs: [generate-coverage]
|
||||||
script:
|
script:
|
||||||
- mv target/site/jacoco public/
|
- mv oysteikt-calc/target/site/jacoco public/
|
||||||
# - mv target/site/apidocs public/
|
# - mv target/site/apidocs public/
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
|
Loading…
Reference in New Issue