From 5180d9f739a79305c1a7d185575f36a48315c91a Mon Sep 17 00:00:00 2001
From: Sonia Zorba <sonia.zorba@inaf.it>
Date: Mon, 25 Oct 2021 16:46:01 +0200
Subject: [PATCH] Added jar upload in CI

---
 .gitlab-ci.yml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 21db9fc..8bd5b12 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@ stages:
   - build
   - generate-test-env
   - test
+  - publish
   - dockerize
 
 variables:
@@ -51,6 +52,13 @@ test:
   only:
     - master
 
+upload_jar:
+  stage: publish
+  tags:
+    - shell
+  script:
+    - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file target/vospace.jar "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/vospace-rest/latest/vospace-rest.jar"'
+
 dockerize:
   stage: dockerize
   tags:
-- 
GitLab