.gitlab-ci.yml 1.55 KB
Newer Older
1
2
3
4
5
6
7
8
9
variables:
  # This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
  # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
  MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
  # As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
  # when running from the command line.
  # `installAtEnd` and `deployAtEnd`are only effective with recent version of the corresponding plugins.
  MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"

Daniel Le Berre's avatar
Daniel Le Berre committed
10
11
maven38-java11-sonar:
    image: maven:3.8.1-jdk-11-slim
Daniel Le Berre's avatar
Daniel Le Berre committed
12
    stage: build
Daniel Le Berre's avatar
Daniel Le Berre committed
13
14
    only: 
      - master
Daniel Le Berre's avatar
Daniel Le Berre committed
15
    script: 
16
      - mvn $MAVEN_CLI_OPTS clean org.jacoco:jacoco-maven-plugin:prepare-agent --settings settings.xml deploy 
17
      - mvn $MAVEN_CLI_OPTS sonar:sonar
18
19
20
21
    cache:
       paths:
        - .m2/repository 

Daniel Le Berre's avatar
Daniel Le Berre committed
22
23
maven38-java11:
    image: maven:3.8.1-jdk-11-slim
24
    stage: build
Daniel Le Berre's avatar
Daniel Le Berre committed
25
26
    except: 
      - master
27
    script: 
28
      - mvn $MAVEN_CLI_OPTS clean package -Dmaven.javadoc.skip=true -Djacoco.skip=true
29
30
31
    cache:
       paths:
        - .m2/repository 
Daniel Le Berre's avatar
Daniel Le Berre committed
32

Daniel Le Berre's avatar
Daniel Le Berre committed
33
34
maven38-java16:
    image: maven:3.8.1-openjdk-16-slim
Daniel Le Berre's avatar
Daniel Le Berre committed
35
36
    stage: test
    script:
37
      - mvn $MAVEN_CLI_OPTS clean package -Dmaven.javadoc.skip=true -Djacoco.skip=true
Daniel Le Berre's avatar
Daniel Le Berre committed
38
39
    allow_failure: true