From 5a2a235b2811fa2392178065cb9759d0186d7f6c Mon Sep 17 00:00:00 2001
From: Nicola Fulvio Calabria <calabria@oats.inaf.it>
Date: Thu, 9 Mar 2023 10:20:56 +0000
Subject: [PATCH] Update .gitlab-ci.yml

---
 .gitlab-ci.yml | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3b325db..8e1a319 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,6 +4,21 @@ stages:
   - deploy
 
 build:
+  stage: build
+  tags:
+    - docker
+  image: maven:3.6.3-openjdk-14
+  script:
+    - mvn clean package -DskipTests -DfinalName=vospace-datamodel
+  artifacts:
+    paths:
+      - target/vospace-datamodel.jar
+      - pom.xml
+    expire_in: 7 days
+  only:
+    - master
+
+build-test:
   stage: build
   tags:
     - docker
@@ -18,7 +33,7 @@ build:
   only:
     - test
 
-test:
+test-test:
   stage: test
   tags:
     - docker
@@ -30,6 +45,19 @@ test:
     - test
 
 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
+
+deploy-test:
   stage: deploy
   tags:
     - docker
-- 
GitLab