From a8edea2a7ad1fdad458d3280477e8d7795e7f675 Mon Sep 17 00:00:00 2001
From: Whitney Armstrong <warmstrong@anl.gov>
Date: Sat, 17 Apr 2021 00:05:06 -0500
Subject: [PATCH] modified: .gitlab-ci.yml modified:
options/env.sh modified: util/print_env.sh
---
.gitlab-ci.yml | 24 ++++++++++++++----------
options/env.sh | 7 +++++++
util/print_env.sh | 1 +
3 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d62de6b0..99797be7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,36 +2,40 @@ image: eicweb.phy.anl.gov:4567/eic/juggler/juggler:$JUGGLER_TAG
default:
artifacts:
- expire_in: 120 mins
+ expire_in: 72 hours
paths:
- results/
- - datasets/
- - sim_output/
- - data
+ - images/
# exclude:
# - .git/
# - datasets/.git/
- before_script:
- - git clone https://eicweb.phy.anl.gov/EIC/NPDet.git
- - git clone https://eicweb.phy.anl.gov/EIC/detectors/topside.git && mkdir topside/build && cd topside/build && cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j20 install && cd ../..
+ #before_script:
+ # - git clone https://eicweb.phy.anl.gov/EIC/NPDet.git
+ # - git clone https://eicweb.phy.anl.gov/EIC/detectors/topside.git && mkdir topside/build && cd topside/build && cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j20 install && cd ../..
# - cd NPDet/build && cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j10 && make install
stages:
+ - config
- initialize
- data_init
- simulate
- benchmarks
- deploy
- #- others
+
+env:
+ stage: config
+ script:
+ - ./util/print_env.sh
+ - mkdir -p /scratch/${CI_PROJECT_NAME}_${CI_PIPELINE_ID}
detector:
stage: initialize
- needs: []
+ needs: ["env"]
timeout: 1 hours
cache:
key:
files:
- - config/env.sh
+ - options/env.sh
- util/build_detector.sh
prefix: "$CI_COMMIT_REF_SLUG"
paths:
diff --git a/options/env.sh b/options/env.sh
index bf20ba41..c392e51d 100755
--- a/options/env.sh
+++ b/options/env.sh
@@ -68,6 +68,12 @@ fi
export JUGGLER_INSTALL_PREFIX=`realpath ${JUGGLER_INSTALL_PREFIX}`
+## Location of local data for pass data from job to job within pipeline.
+## Not saved as artifacts.
+if [ ! -n "${LOCAL_DATA_PATH}" ] ; then
+ LOCAL_DATA_PATH="/scratch/${CI_PROJECT_NAME}_${CI_PIPLINE_ID}"
+fi
+
## =============================================================================
## Other utility variables that govern how some of the dependent packages
## are built and installed. You should not have to change these.
@@ -94,6 +100,7 @@ echo "JUGGLER_N_EVENTS: ${JUGGLER_N_EVENTS}"
echo "JUGGLER_N_THREADS: ${JUGGLER_N_THREADS}"
echo "JUGGLER_RNG_SEED: ${JUGGLER_RNG_SEED}"
echo "JUGGLER_INSTALL_PREFIX: ${JUGGLER_INSTALL_PREFIX}"
+echo "LOCAL_DATA_PATH: ${LOCAL_DATA_PATH}"
echo "LOCAL_PREFIX: ${LOCAL_PREFIX}"
echo "DETECTOR_PREFIX: ${DETECTOR_PREFIX}"
echo "DETECTOR_PATH: ${DETECTOR_PATH}"
diff --git a/util/print_env.sh b/util/print_env.sh
index ce401050..7a4a8935 100755
--- a/util/print_env.sh
+++ b/util/print_env.sh
@@ -7,6 +7,7 @@ echo "JUGGLER_N_EVENTS: ${JUGGLER_N_EVENTS}"
echo "JUGGLER_N_THREADS: ${JUGGLER_N_THREADS}"
echo "JUGGLER_RNG_SEED: ${JUGGLER_RNG_SEED}"
echo "JUGGLER_INSTALL_PREFIX: ${JUGGLER_INSTALL_PREFIX}"
+echo "LOCAL_DATA_PATH: ${LOCAL_DATA_PATH}"
echo "LOCAL_PREFIX: ${LOCAL_PREFIX}"
echo "DETECTOR_PREFIX: ${DETECTOR_PREFIX}"
echo "DETECTOR_PATH: ${DETECTOR_PATH}"
--
GitLab