Commit e921e4e6 authored by Antoine Mottier's avatar Antoine Mottier
Browse files

Update CI to build, test and package webapp

- Rename variable with data-collection pom file path.
- Remove `target` folder from cache (see recommendation regarding cache usage here: https://docs.gitlab.com/ee/ci/caching/).
- Rename `jar` job to `package`.
- Add jobs for the webapp.
parent b0666083
Pipeline #10832 passed with stages
in 2 minutes and 55 seconds
stages:
- build
- test
- jar
- package
- deploy
image: maven:3.6.3-openjdk-11
......@@ -9,31 +9,49 @@ image: maven:3.6.3-openjdk-11
variables:
MAVEN_CLI_OPTS: "--batch-mode"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
MAVEN_OPTS_OW2_MRL_FILE: "--file data-collection/pom.xml"
MAVEN_CLI_OPTS_DATA_COLLECTION_POM_FILE: "--file data-collection/pom.xml"
MAVEN_CLI_OPTS_WEBAPP_POM_FILE: "--file webapp/pom.xml"
cache:
paths:
- .m2/repository/
- target/
build-data-collection:
stage: build
script:
- mvn $MAVEN_OPTS_OW2_MRL_FILE $MAVEN_CLI_OPTS compile
- mvn $MAVEN_CLI_OPTS_DATA_COLLECTION_POM_FILE $MAVEN_CLI_OPTS compile
build-webapp:
stage: build
script:
- mvn $MAVEN_CLI_OPTS_WEBAPP_POM_FILE $MAVEN_CLI_OPTS compile
test-data-collection:
stage: test
script:
- mvn $MAVEN_OPTS_OW2_MRL_FILE $MAVEN_CLI_OPTS test
- mvn $MAVEN_CLI_OPTS_DATA_COLLECTION_POM_FILE $MAVEN_CLI_OPTS test
test-webapp:
stage: test
script:
- mvn $MAVEN_CLI_OPTS_WEBAPP_POM_FILE $MAVEN_CLI_OPTS test
jar-data-collection:
stage: jar
stage: package
script:
- mvn $MAVEN_OPTS_OW2_MRL_FILE $MAVEN_CLI_OPTS package
- mvn $MAVEN_CLI_OPTS_DATA_COLLECTION_POM_FILE $MAVEN_CLI_OPTS package
artifacts:
paths:
- data-collection/target/*.jar
war-webapp:
stage: package
script:
- mvn $MAVEN_CLI_OPTS_WEBAPP_POM_FILE $MAVEN_CLI_OPTS package
artifacts:
paths:
- webapp/target/*.war
deploy-data-collection:
stage: deploy
script:
......
Supports Markdown
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