Skip to content
Snippets Groups Projects
Commit 60251f87 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Added CI

parent e9064ef5
No related branches found
No related tags found
No related merge requests found
Pipeline #703 passed
stages:
- build
- test
- deploy
build:
stage: build
tags:
- docker
image: maven:3.6.3-openjdk-11
script:
- mvn clean package -DskipTests -DfinalName=vospace-datamodel
artifacts:
paths:
- target/vospace-datamodel.jar
- pom.xml
expire_in: 7 days
only:
- master
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:
- master
deploy:
stage: deploy
tags:
- docker
script:
- mvn deploy:deploy-file
-Dfile=target/vospace-datamodel.jar
-DrepositoryId=ia2.snapshots
-DpomFile=pom.xml
-Durl=${IA2_MVN_REPO_SNAPSHOTS}
only:
- master
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source> <maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target> <maven.compiler.target>11</maven.compiler.target>
<finalName>${project.artifactId}-${project.version}</finalName>
</properties> </properties>
<dependencies> <dependencies>
...@@ -45,6 +46,7 @@ ...@@ -45,6 +46,7 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>${finalName}</finalName>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment