From 67b88f09ab5a9c2ccbbb217f7c082699d9c67b97 Mon Sep 17 00:00:00 2001
From: Sylvester Joosten <sjoosten@anl.gov>
Date: Sat, 14 Aug 2021 18:57:21 +0000
Subject: [PATCH] Change dependencies of downstream trigger.

---
 .gitlab-ci.yml   | 37 ++++++++-----------------------------
 views/view1.yml  |  2 +-
 views/view11.yml |  4 +---
 views/view12.yml |  2 +-
 views/view13.yml |  2 +-
 views/view14.yml |  2 +-
 views/view15.yml |  2 +-
 views/view2.yml  |  2 +-
 views/view20.yml |  2 +-
 views/view3.yml  |  2 +-
 views/view6.yml  |  2 +-
 views/view7.yml  |  2 +-
 12 files changed, 19 insertions(+), 42 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 399cb68f..c11ac339 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,8 +30,8 @@ default:
 
 stages:
   - config
-  - initialize
   - build
+  - test
   - docs
   - test 
   - collect
@@ -59,8 +59,9 @@ common:setup:
     - source setup/bin/env.sh && ./setup/bin/install_common.sh
 
 common:detector:
-  stage: initialize
-  needs: ["common:setup"]
+  stage: build
+  needs: 
+    - common:setup
   script:
     - source .local/bin/env.sh && build_detector.sh
     - mkdir_local_data_link sim_output
@@ -70,10 +71,8 @@ common:detector:
     - mkdir -p geo
     - print_env.sh
 
-compile:
+build:simple:
   stage: build
-  needs:
-    - ["common:detector"]
   script:
     - mkdir -p build && cd build && cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j20 && make install  && cd ..
     - echo "Build successful."
@@ -239,26 +238,6 @@ benchmarks:detector:
   trigger:
     project: EIC/benchmarks/detector_benchmarks
     strategy: depend
-  needs: ["overlap_check_tgeo","report"]
-
-    #benchmarks:reconstruction:
-    #  stage: deploy
-    #  variables:
-    #    JUGGLER_DETECTOR: "$JUGGLER_DETECTOR"
-    #    JUGGLER_DETECTOR_VERSION: "$JUGGLER_DETECTOR_VERSION"
-    #  trigger:
-    #    project: EIC/benchmarks/reconstruction_benchmarks
-    #    strategy: depend
-    #  needs: ["env","overlap_check_tgeo","overlap_check_geant4","report"]
-    #  
-    #
-    #benchmarks:physics:
-    #  stage: deploy
-    #  variables:
-    #    JUGGLER_DETECTOR: "$JUGGLER_DETECTOR"
-    #    JUGGLER_DETECTOR_VERSION: "$JUGGLER_DETECTOR_VERSION"
-    #  trigger:
-    #    project: EIC/benchmarks/physics_benchmarks
-    #    strategy: depend
-    #  needs: ["env","overlap_check_tgeo","overlap_check_geant4","report"]
-
+  needs: 
+    - overlap_check_tgeo
+    - common:detector
diff --git a/views/view1.yml b/views/view1.yml
index 9856f143..cbcdedd7 100644
--- a/views/view1.yml
+++ b/views/view1.yml
@@ -16,7 +16,7 @@ dawn_view_01:ev002:
     - ./bin/make_dawn_views -t view01_ev002 -d scripts/view1 -s 2
 
 view_01:
-  stage: test
+  stage: collect
   rules:
     - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"' 
   needs:
diff --git a/views/view11.yml b/views/view11.yml
index 9b3b384f..ca6905ba 100644
--- a/views/view11.yml
+++ b/views/view11.yml
@@ -34,12 +34,10 @@ dawn_view_11:ev004:
     - ./bin/make_dawn_views -t view11 -d scripts/view11 -s 4
 
 view_11:
-  stage: test
+  stage: collect
   rules:
     - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"' 
   needs:
-    - job: compile
-      optional: false
     - job: dawn_view_11:detector
       optional: false
     - job: dawn_view_11:ev001
diff --git a/views/view12.yml b/views/view12.yml
index 4f7d6ccd..13316030 100644
--- a/views/view12.yml
+++ b/views/view12.yml
@@ -4,7 +4,7 @@ dawn_view_12:detector:
     - ./bin/make_dawn_views -t view12 -d scripts/view12 -D
 
 view_12:
-  stage: test
+  stage: collect
   rules:
     - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"' 
   needs:
diff --git a/views/view13.yml b/views/view13.yml
index c5d4f486..9360140c 100644
--- a/views/view13.yml
+++ b/views/view13.yml
@@ -4,7 +4,7 @@ dawn_view_13:detector:
     - ./bin/make_dawn_views -t view13 -d scripts/view13 -D
 
 view_13:
-  stage: test
+  stage: collect
   rules:
     - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"' 
   needs:
diff --git a/views/view14.yml b/views/view14.yml
index 9cd9a365..de135eb0 100644
--- a/views/view14.yml
+++ b/views/view14.yml
@@ -4,7 +4,7 @@ dawn_view_14:detector:
     - ./bin/make_dawn_views -t view14 -d scripts/view14 -D
 
 view_14:
-  stage: test
+  stage: collect
   rules:
     - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"' 
   needs:
diff --git a/views/view15.yml b/views/view15.yml
index 124ca01b..8e6bd133 100644
--- a/views/view15.yml
+++ b/views/view15.yml
@@ -4,7 +4,7 @@ dawn_view_15:detector:
     - ./bin/make_dawn_views -t view15 -d scripts/view15 -D
 
 view_15:
-  stage: test
+  stage: collect
   rules:
     - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"' 
   needs:
diff --git a/views/view2.yml b/views/view2.yml
index 10368277..fafb8adc 100644
--- a/views/view2.yml
+++ b/views/view2.yml
@@ -22,7 +22,7 @@ dawn_view_02:ev003:
     - ./bin/make_dawn_views -t view02_ev003 -d scripts/view2 -s 3
 
 view_02:
-  stage: test
+  stage: collect
   rules:
     - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"' 
   needs:
diff --git a/views/view20.yml b/views/view20.yml
index 5436fc57..75cdb440 100644
--- a/views/view20.yml
+++ b/views/view20.yml
@@ -19,7 +19,7 @@ dawn_view_20:ev002:
     - ./bin/make_dawn_views -t view20_ev002 -d scripts/view20 -s 2
 
 view_20:
-  stage: test
+  stage: collect
   rules:
     - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"' 
   needs:
diff --git a/views/view3.yml b/views/view3.yml
index b3146567..ea4dd114 100644
--- a/views/view3.yml
+++ b/views/view3.yml
@@ -14,7 +14,7 @@ dawn_view_03:ev002:
     - ./bin/make_dawn_views -t view02_ev002 -d scripts/view3 -s 2
 
 view_03:
-  stage: test
+  stage: collect
   rules:
     - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"' 
   needs:
diff --git a/views/view6.yml b/views/view6.yml
index 92654e6d..8d16aa35 100644
--- a/views/view6.yml
+++ b/views/view6.yml
@@ -28,7 +28,7 @@ dawn_view_06:ev004:
     - ./bin/make_dawn_views -t view06_ev004 -d scripts/view6 -s 4
 
 view_06:
-  stage: test
+  stage: collect
   rules:
     - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"' 
   needs:
diff --git a/views/view7.yml b/views/view7.yml
index 444140dd..740ef72d 100644
--- a/views/view7.yml
+++ b/views/view7.yml
@@ -16,7 +16,7 @@ dawn_view_07:ev003:
     - ./bin/make_dawn_views -t view07_ev003 -d scripts/view7 -s 3
 
 view_07:
-  stage: test
+  stage: collect
   rules:
     - if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"' 
   needs:
-- 
GitLab