Commit 090db753 authored by Colin DAMON's avatar Colin DAMON
Browse files

Mutualise builds

parent 5cfd5d36
......@@ -2,11 +2,33 @@ variables:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
stages:
- build
cache:
paths:
- .m2/repository
.java:
image: maven:3.6.3-jdk-14
tags: docker
stage: build
tags:
- docker
before_script:
- cd $PROJECT_FOLDER
script:
- mvn $MAVEN_CLI_OPTS clean package
- cat target/site/jacoco/index.html
artifacts:
reports:
junit: $PROJECT_FOLDER/target/surefire-reports/TEST-*.xml
expire_in: 1 day
only:
refs:
- master
- merge_requests
changes:
- ".gitlab-ci.yml"
- ".gitlab-common-ci.yml"
- "$PROJECT_FOLDER/**/*"
coverage: '/Total.*?([0-9]{1,3})%/'
stages:
- build
package-roman-numerals:
variables:
PROJECT_FOLDER: "romanNumerals"
extends: .java
stage: build
tags:
- docker
script:
- cd romanNumerals
- mvn $MAVEN_CLI_OPTS clean package
- cat target/site/jacoco/index.html
artifacts:
reports:
junit: romanNumerals/target/surefire-reports/TEST-*.xml
expire_in: 1 day
only:
refs:
- master
- merge_requests
changes:
- ".gitlab-ci.yml"
- ".gitlab-common-ci.yml"
- "romanNumerals/**/*"
stages:
- build
package-string-calculator:
variables:
PROJECT_FOLDER: "stringCalculator"
extends: .java
stage: build
tags:
- docker
script:
- cd stringCalculator
- mvn $MAVEN_CLI_OPTS clean package
- cat target/site/jacoco/index.html
artifacts:
reports:
junit: stringCalculator/target/surefire-reports/TEST-*.xml
expire_in: 1 day
only:
refs:
- master
- merge_requests
changes:
- ".gitlab-ci.yml"
- ".gitlab-common-ci.yml"
- "stringCalculator/**/*"
stages:
- build
package-word-wrap:
variables:
PROJECT_FOLDER: "wordWrap"
extends: .java
stage: build
tags:
- docker
script:
- cd wordWrap
- mvn $MAVEN_CLI_OPTS clean package
- cat target/site/jacoco/index.html
artifacts:
reports:
junit: wordWrap/target/surefire-reports/TEST-*.xml
expire_in: 1 day
only:
refs:
- master
- merge_requests
changes:
- ".gitlab-ci.yml"
- ".gitlab-common-ci.yml"
- "wordWrap/**/*"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment