stages: - build - visualize variables: MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true" REPO_NAME: nfs4j # Cache downloaded dependencies and plugins between builds. # To keep cache across branches add 'key: "$CI_JOB_NAME"' cache: key: files: - pom.xml prefix: "$CI_JOB_NAME" paths: - ./.m2/repository build: stage: build image: maven:3.6.3-openjdk-11 script: - mvn $MAVEN_CLI_OPTS clean org.jacoco:jacoco-maven-plugin:prepare-agent package jacoco:report artifacts: reports: junit: - "**/target/surefire-reports/TEST-*.xml" - "**/target/failsafe-reports/TEST-*.xml" paths: - "**/target/dcache-cta*.tar.gz" coverage-jdk11: # 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: visualize 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: ["build"] artifacts: reports: cobertura: target/site/cobertura.xml