From 5ec8a5c8f03402607e7b36b91cacc2df1d658cf2 Mon Sep 17 00:00:00 2001
From: Sylvester Joosten <sjoosten@anl.gov>
Date: Tue, 1 Dec 2020 14:45:03 +0000
Subject: [PATCH] Some cleanup/improved consistency of the CI

---
 .gitlab-ci.yml | 51 +++++++++++++++++++++++++-------------------------
 1 file changed, 26 insertions(+), 25 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c801abf95..4f1356a84 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -137,53 +137,55 @@ release:unstable:
      - make login
      - make develop-cached
 
-builder:singularity:
+release:singularity:
   stage: singularity
   tags:
      - silicon
   only:
      - tags
-  needs: ["builder:stable"]
-  when: manual
+  needs: ["release:stable"]
   script:
-     - cp containers/builder/eic_builder.def .
+     - cp containers/release/eic.def .
      - /bin/bash .gitlabci/setup.sh
-     - /bin/bash .gitlabci/build.sh eic_builder.def
+     - /bin/bash .gitlabci/build.sh eic.def
      - mkdir -p build 
-     - cp eic_builder.sif build/.
-     - cp eic_builder.def build/.
+     - cp eic.sif build/.
+     - cp eic.def build/.
   artifacts:
+      expire_in: 90 days # this will change in future gitlab vesions :https://docs.gitlab.com/13.3/ee/ci/yaml/README.html#artifactsexpire_in
       paths:
-        - build/eic_builder.sif
-        - build/eic_builder.def
-
-builder:singularity:unstable:
+        - build/eic.sif
+        - build/eic.def
+release:singularity:stable:
   stage: singularity
   tags:
      - silicon
   only:
-     - develop
-  needs: ["builder:unstable"]
-  when: manual
+     - master
+  when: 
+     - manual
+  needs: ["release:stable"]
   script:
-     - cp containers/builder/eic_builder.def .
+     - cp containers/release/eic.def .
      - /bin/bash .gitlabci/setup.sh
-     - /bin/bash .gitlabci/build.sh eic_builder.def
+     - /bin/bash .gitlabci/build.sh eic.def
      - mkdir -p build 
-     - cp eic_builder.sif build/.
-     - cp eic_builder.def build/.
+     - cp eic.sif build/.
+     - cp eic.def build/.
   artifacts:
+      expire_in: 90 days # this will change in future gitlab vesions :https://docs.gitlab.com/13.3/ee/ci/yaml/README.html#artifactsexpire_in
       paths:
-        - build/eic_builder.sif
-        - build/eic_builder.def
-
-release:singularity:
+        - build/eic.sif
+        - build/eic.def
+release:singularity:testing:
   stage: singularity
   tags:
      - silicon
   only:
-     - tags
-  needs: ["release:stable"]
+     - staging
+  when: 
+     - manual
+  needs: ["release:testing"]
   script:
      - cp containers/release/eic.def .
      - /bin/bash .gitlabci/setup.sh
@@ -196,7 +198,6 @@ release:singularity:
       paths:
         - build/eic.sif
         - build/eic.def
-
 release:singularity:unstable:
   stage: singularity
   tags:
-- 
GitLab