From 235ba32b9bcc8e660afb36ccfe6353f93f277d97 Mon Sep 17 00:00:00 2001
From: Michael Blaschek <michael.blaschek@univie.ac.at>
Date: Wed, 6 Sep 2023 15:15:21 +0000
Subject: [PATCH] Update .gitlab-ci.yml file

---
 .gitlab-ci.yml | 36 +++++++++---------------------------
 1 file changed, 9 insertions(+), 27 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d7bfb4f..8f8f9b8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,36 +1,18 @@
 image:
-  name: quay.io/singularity/singularity:v3.7.3
+  name: quay.io/singularity/singularity:v3.11.4-slim
   entrypoint: ["/bin/sh", "-c"]
 
+variables:
+    sfile: definition-files/almalinux/Singularity.base
+    libarypath: almalinux:8-base
+
 build:
     when: manual
     script:
-        - /bin/bash .gitlabci/build.sh definition-files/almalinux/Singularity.base
         # step 1. build the container!
-        # You can add any other sregistry push commands here, and specify a client
-        # (and make sure your define the encrypted environment credentials in gitlab
-        # to push to your storage locations of choice
-
-        - mkdir -p build && cp *.sif build
-        #- mkdir -p build && cp Singularity* build
-
-        # Step 2. Take a look at "artifacts" below and add the paths you want added
-        # You can also add the entire build folder. You can also upload to storage
-        # clients defined by sregistry, here are some examples
-        # https://singularityhub.github.io/sregistry-cli/clients
-        # Environment variables must be defined in CI encrypted secrets/settings
-        # https://code.stanford.edu/help/ci/variables/README#variables).
-        #- /bin/bash build.sh --uri collection/container --cli google-storage Singularity
-        #- /bin/bash build.sh --uri collection/container --cli google-drive Singularity
-        #- /bin/bash build.sh --uri collection/container --cli globus Singularity
-        #- /bin/bash build.sh --uri collection/container --cli registry Singularity
-
-    # This is where you can save job artifacts
-    # https://docs.gitlab.com/ee/user/project/pipelines/job_artifacts.html
-    # You can specify the path to containers or the build folder to save.
-    # Don't forget to save your recipes too!
+        - /bin/bash .gitlabci/build.sh $sfile
+        # step 2. push to harbor
+        - singularity push ${sfile}.sif oras://harbor.wolke.img.univie.ac.at/apptainer/${librarypath}
     artifacts:
         paths:
-            - build/Singularity.sif
-            - build/Singularity
-
+            - ${sfile}.sif
-- 
GitLab