.gitlab-ci.yml 740 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 12
  script:
    - cd java
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 17 18
  artifacts:
    paths:
      - java/target/*.jar

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

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 36 37 38
  script:
    - cd java
    - 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
  only:
    - master
Merisier Tac's avatar
Merisier Tac committed
39
    - tags