.gitlab-ci.yml 796 Bytes
Newer Older
cailliaud's avatar
cailliaud committed
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
image: maven:latest

variables:
  MAVEN_CLI_OPTS: '-s .m2/settings.xml --batch-mode'

cache:
  paths:
    - .maven/

before_script:
  - export MAVEN_USER_HOME=`pwd`/.maven

maven-compile:
  stage: build
  script:
    - ./mvnw $MAVEN_CLI_OPTS compile -Dmaven.repo.local=$MAVEN_USER_HOME
  artifacts:
    paths:
      - target/classes/
      - target/generated-sources/
    expire_in: 1 day

maven-test:
  stage: test
  script: ./mvnw $MAVEN_CLI_OPTS verify -Dmaven.repo.local=$MAVEN_USER_HOME
  artifacts:
    reports:
      junit: target/test-results/**/TEST-*.xml
      dependency_scanning: target/dependency-check-report.xml
    paths:
      - target/test-results
      - target/jacoco
      - target/dependency-check-report.xml
      - target/dependency-check-report.html
    expire_in: 1 day