.gitlab-ci.yml 663 Bytes
Newer Older
Ludovic Cottret's avatar
Ludovic Cottret committed
1
2
image: maven:latest

Ludovic Cottret's avatar
Ludovic Cottret committed
3
4
5
6
variables:
   MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
   MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"

Ludovic Cottret's avatar
Ludovic Cottret committed
7
8
9
10
11
12
cache:
  paths:
    - .m2/repository/
    - target/

build:
Ludovic Cottret's avatar
Ludovic Cottret committed
13
14
15
16
17
18
19
20
21
  stage: build
  script:
    - mvn compile

test:
  stage: test
  script:
    - mvn test

Ludovic Cottret's avatar
Ludovic Cottret committed
22
verify:
Ludovic Cottret's avatar
Ludovic Cottret committed
23
  stage: test
Ludovic Cottret's avatar
Ludovic Cottret committed
24
25
26
  script:
    - mvn verify

Ludovic Cottret's avatar
Ludovic Cottret committed
27
28
29
30
31
32
33
deploySnapshot:
  stage: deploy
  script:
    - mvn $MAVEN_CLI_OPTS deploy -Dmaven.test.skip=true 
  only: 
   - develop

lcottret's avatar
lcottret committed
34
35
36
deployCentral:
  stage: deploy
  script:
lcottret's avatar
lcottret committed
37
    - mvn $MAVEN_CLI_OPTS --batch-mode release:prepare -DautoVersionSubmodules=true -Dmaven.test.skip=true
lcottret's avatar
lcottret committed
38
39
40
41
    - mvn release:perform
  only:
    - /^release.*$/