.gitlab-ci.yml 774 Bytes
Newer Older
Cypres TAC's avatar
Cypres TAC committed
1
image: maven:3.6-jdk-11
Merisier Tac's avatar
Merisier Tac committed
2 3 4 5 6

stages:
  - build
  - deploy

Merisier Tac's avatar
Merisier Tac committed
7
build:
Merisier Tac's avatar
Merisier Tac committed
8
  stage: build
Merisier Tac's avatar
Merisier Tac committed
9 10
  tags:
    - ci
Merisier Tac's avatar
Merisier Tac committed
11
  script:
Cypres TAC's avatar
Cypres TAC committed
12
    - cd CLEA-lib
Merisier Tac's avatar
Merisier Tac committed
13 14
    # build all (for other phase such as docker) but skip tests
    - mvn -DskipTests=true package
Merisier Tac's avatar
Merisier Tac committed
15 16
  artifacts:
    paths:
Cypres TAC's avatar
Cypres TAC committed
17
      - CLEA-lib/java/target/*.jar
Merisier Tac's avatar
Merisier Tac committed
18

Merisier Tac's avatar
Merisier Tac committed
19 20 21 22 23
test:
  stage: build
  tags:
    - ci
  script:
Cypres TAC's avatar
Cypres TAC committed
24
    - cd CLEA-lib/java
Merisier Tac's avatar
Merisier Tac committed
25 26 27
    - mvn verify
  artifacts:
    paths:
Cypres TAC's avatar
Cypres TAC committed
28
      - CLEA-lib/java/target/*.jar
Merisier Tac's avatar
Merisier Tac committed
29 30

deploy:
Merisier Tac's avatar
Merisier Tac committed
31
  stage: deploy
Merisier Tac's avatar
Merisier Tac committed
32 33
  tags:
    - ci
Merisier Tac's avatar
Merisier Tac committed
34 35
  script:
    - cd java
Cypres TAC's avatar
Cypres TAC committed
36
    - mvn $MAVEN_CLI_OPTS -DskipTests=true  -DnexusReleasesUrl=$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/maven -DnexusSnapshotsUrl=$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/maven -s ../../.gitlab-ci/ci_settings.xml deploy
Merisier Tac's avatar
Merisier Tac committed
37 38
  only:
    - master
Merisier Tac's avatar
Merisier Tac committed
39
    - tags