.gitlab-ci.yml 856 Bytes
Newer Older
sunye's avatar
sunye 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
image: docker-registry.univ-nantes.fr/sunye-g/docker-java-maven:latest

variables:
  MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Dhttps.proxyHost=proxy-serveur.univ-nantes.prive -Dhttps.proxyPort=3128"
  MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"

cache:
  paths:
    - .m2/repository/
  key: "$CI_BUILD_REF_NAME"

build:
  stage: build
  script:
    - java -version
    - mvn -version
    - 'mvn --settings ./.gitlab.maven.settings.xml $MAVEN_OPTS -e $MAVEN_CLI_OPTS compile'
  artifacts:
    paths:
      - target/

verify:
  stage: test
  script:
    - 'mvn --settings ./.gitlab.maven.settings.xml $MAVEN_OPTS verify'
  artifacts:
    paths:
      - target/