-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
38 lines (32 loc) · 1.13 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
image: krissrex/docker-java8-maven-testfxmonocle:1.0
# image: kaiwinter/docker-java8-maven
# image: maven:3.3.9-jdk-8
# most of this taken from https://stackoverflow.com/questions/37785154/how-to-enable-maven-artifact-caching-for-gitlab-ci-runner
cache:
paths:
- .m2/repository
# keep cache across branch
key: "$CI_BUILD_REF_NAME"
variables:
MAVEN_OPTS: "-Djava.awt.headless=true -Dmaven.repo.local=.m2/repository"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -Dgitlab-ci=true"
build-job:
stage: build
script:
- "mvn clean compile -f tdt4140-gr1802/pom.xml $MAVEN_CLI_OPTS"
# - "mvn clean compile -f tdt4140-gr1800/pom.xml $MAVEN_CLI_OPTS"
unittest-job:
stage: test
dependencies:
- build-job
script:
- "mvn package -f tdt4140-gr1802/pom.xml $MAVEN_CLI_OPTS"
# - "mvn package -f tdt4140-gr1800/pom.xml $MAVEN_CLI_OPTS"
# - "cat tdt4140-gr1800/app.core/target/site/jacoco/index.html"
integrationtest-job:
stage: test
dependencies:
- build-job
script:
- "mvn verify -f tdt4140-gr1802/pom.xml $MAVEN_CLI_OPTS"
# - "mvn verify -f tdt4140-gr1800/pom.xml $MAVEN_CLI_OPTS"