Skip to content
Snippets Groups Projects
Commit 029b4335 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Merge branch 'configs-before-script' into 'main'

feat: enumerate configs in default:before_script

See merge request !5
parents bc64b8b9 809e7617
No related branches found
No related tags found
1 merge request!5feat: enumerate configs in default:before_script
Pipeline #119340 passed
...@@ -2,7 +2,11 @@ image: ${BENCHMARKS_REGISTRY}/${BENCHMARKS_CONTAINER}:${BENCHMARKS_TAG} ...@@ -2,7 +2,11 @@ image: ${BENCHMARKS_REGISTRY}/${BENCHMARKS_CONTAINER}:${BENCHMARKS_TAG}
default: default:
before_script: before_script:
- source .local/bin/env.sh - if [ -f .local/bin/env.sh ] ; then
source .local/bin/env.sh ;
source /opt/detector/epic-main/bin/thisepic.sh ;
export configs=$(ls -1 ${DETECTOR_PATH} | sed '/epic_.*\.xml$/!d;s/^epic_\(.*\).xml/\1/g' | xargs) ;
fi
interruptible: true interruptible: true
artifacts: artifacts:
expire_in: 3 days expire_in: 3 days
...@@ -27,12 +31,10 @@ stages: ...@@ -27,12 +31,10 @@ stages:
- status-report - status-report
.status: .status:
image: curlimages/curl:latest
before_script: []
script: script:
- | - |
if [ -n "${GITHUB_SHA}" ] ; then if [ -n "${GITHUB_SHA}" ] ; then
for config in ${DETECTOR_CONFIG//,/ } ; do for config in ${configs} ; do
echo ${config} ; echo ${config} ;
curl \ curl \
-X POST \ -X POST \
...@@ -75,9 +77,6 @@ common:setup: ...@@ -75,9 +77,6 @@ common:setup:
.geoviewer: .geoviewer:
needs: needs:
- ["common:setup"] - ["common:setup"]
before_script:
- source .local/bin/env.sh
- source /opt/detector/epic-main/setup.sh
retry: retry:
max: 2 max: 2
when: when:
...@@ -92,9 +91,9 @@ convert: ...@@ -92,9 +91,9 @@ convert:
script: script:
- mkdir -p geo - mkdir -p geo
- | - |
for config in ${DETECTOR_CONFIG//,/ } ; do for config in ${configs} ; do
echo ${config} ; echo ${config} ;
dd_web_display --output geo/${config}.root ${DETECTOR_PATH}/${config}.xml dd_web_display --output geo/${config}.root ${DETECTOR_PATH}/epic_${config}.xml
done ; done ;
echo "TARGET_URL=https://eic.phy.anl.gov/geoviewer/index.htm?file=https://eicweb.phy.anl.gov/EIC/benchmarks/geoviewer/-/jobs/${CI_JOB_ID}/artifacts/raw/geo/%config%.root?job=convert&item=default;1&opt=clipx;clipy;transp30;zoom75;ROTY320;ROTZ340;trz0;trr0;ctrl;all" | tee -a .env echo "TARGET_URL=https://eic.phy.anl.gov/geoviewer/index.htm?file=https://eicweb.phy.anl.gov/EIC/benchmarks/geoviewer/-/jobs/${CI_JOB_ID}/artifacts/raw/geo/%config%.root?job=convert&item=default;1&opt=clipx;clipy;transp30;zoom75;ROTY320;ROTZ340;trz0;trr0;ctrl;all" | tee -a .env
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment