.gitlab-ci.yml 933 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

stages:
  - build
  - deploy
Kumquat Orange's avatar
Kumquat Orange committed
6
  - buildjs
Merisier Tac's avatar
Merisier Tac committed
7

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

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

deploy:
Merisier Tac's avatar
Merisier Tac committed
32
  stage: deploy
Merisier Tac's avatar
Merisier Tac committed
33 34
  tags:
    - ci
Merisier Tac's avatar
Merisier Tac committed
35
  script:
Cypres TAC's avatar
Cypres TAC committed
36
    - cd CLEA-lib/java
Cypres TAC's avatar
Cypres TAC committed
37
    - 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
38 39
  only:
    - master
Merisier Tac's avatar
Merisier Tac committed
40
    - tags
Kumquat Orange's avatar
Kumquat Orange committed
41 42 43 44 45 46 47 48 49 50 51

buildjs:
  stage: buildjs
  image: node:15.13.0
  tags:
    - ci
  script:
    - cd CLEA-lib/js
    - npm run build
    - ls dist