Commit 5933699a authored by Nicola Fulvio Calabria's avatar Nicola Fulvio Calabria
Browse files

Update .gitlab-ci.yml

parent 1fd17489
Loading
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
@@ -18,6 +18,21 @@ build:
  only:
    - master

build-test:
  stage: build
  tags:
    - docker
  image: maven:3.6.3-openjdk-14
  script:
    - mvn clean package -DskipTests -DfinalName=vospace-datamodel-test -Drevision=TEST
  artifacts:
    paths:
      - target/vospace-datamodel-test.jar
      - flattened-pom.xml
    expire_in: 7 days
  only:
    - test

test:
  stage: test
  tags:
@@ -29,6 +44,17 @@ test:
  only:
    - master

test-test:
  stage: test
  tags:
    - docker
  script:
    - mvn clean test
    - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print "coverage=" 100*covered/instructions }' target/site/jacoco/jacoco.csv
  coverage: '/coverage=\d+\.\d+/'
  only:
    - test

deploy:
  stage: deploy
  tags:
@@ -41,3 +67,16 @@ deploy:
        -Durl=${IA2_MVN_REPO_SNAPSHOTS}
  only:
    - master

deploy-test:
  stage: deploy
  tags:
    - docker
  script:
    - mvn deploy:deploy-file
        -Dfile=target/vospace-datamodel-test.jar
        -DrepositoryId=ia2.snapshots
        -DpomFile=flattened-pom.xml
        -Durl=${IA2_MVN_REPO_SNAPSHOTS}
  only:
    - test