Skip to content
Snippets Groups Projects

support custom phase per project

Merged Hahn Axel (hahn) requested to merge 5927-overide-phase-per-project into master
1 file
+ 17
5
Compare changes
  • Side-by-side
  • Inline
+ 17
5
@@ -12,7 +12,7 @@
# 2021-11-01 v0.6 <axel.hahn@iml.unibe.ch> save config diffs
# 2021-11-02 v0.7 <axel.hahn@iml.unibe.ch> delete logs keping N files
# 2022-11-24 v0.8 <axel.hahn@iml.unibe.ch> tar -xzf without dot as 2nd param
# 2022-11-25 v0.9 <axel.hahn@iml.unibe.ch> support custom phase per project
# 2022-11-25 v0.9 <axel.hahn@iml.unibe.ch> support custom phase + file per project
# ======================================================================
@@ -76,9 +76,17 @@ function setprofile(){
fi
echo "OK, profile [${profile}] was set."
downloadfile="${tmpdir}/${IMLCI_PROJECT}.tgz"
downloadtmp="${tmpdir}/${IMLCI_PROJECT}.tgz.tmp"
cfgdiff="${tmpdir}/${IMLCI_PROJECT}_cfgdiff.txt"
local localfile
if [ -n "$IMLCI_FILE" ]; then
localfile="${IMLCI_PROJECT}__${IMLCI_FILE}"
else
IMLCI_FILE="${IMLCI_PROJECT}.tgz"
localfile="${IMLCI_FILE}"
fi
downloadfile="${tmpdir}/${localfile}"
downloadtmp="${tmpdir}/${localfile}.tmp"
cfgdiff="${tmpdir}/${localfile}_cfgdiff.txt"
test -f "${cfgdiff}" && rm -f "${cfgdiff}"
}
@@ -149,7 +157,11 @@ function deploy(){
# getfile.sh reads phase from its cfg file - we need to add it as parameter
test -n "${IMLCI_PHASE}" && dlparams="$dlparams -e ${IMLCI_PHASE}"
${selfdir}/bin/getfile.sh ${dlparams} -f ${IMLCI_PROJECT}.tgz -o ${downloadtmp}
# set the filename to fetch
test -n "$IMLCI_FILE" || dlparams="$dlparams -f ${IMLCI_PROJECT}.tgz"
test -n "$IMLCI_FILE" && dlparams="$dlparams -f $IMLCI_FILE"
${selfdir}/bin/getfile.sh ${dlparams} -o ${downloadtmp}
if [ $? -ne 0 ]; then
echo Download failed.
echo Repeating request with debug param -d to get the error...
Loading