Commit 622980f6 authored by Yori Fournier's avatar Yori Fournier
Browse files

corrected the dependance issue (dep_id was failing)

parent a1c3c2d6
......@@ -15,34 +15,28 @@ do
fi
done
echo "" > current_pipeline.txt
echo -n "" > current_pipeline.txt
for step_name in ${STEPS[@]};
do
echo
echo
echo "Start step: ${step_name}"
COMMIT=`./stoml ${PIPE_ROOT}/config.toml steps.${step_name}.commit`
DEPS=(`./stoml ${PIPE_ROOT}/config.toml steps.${step_name}.dep`)
echo "Parameters: ${COMMIT} ${DEPS[@]}"
echo ">>> ${COMMIT}"
echo ">>> ${DEPS[@]}"
# get the directory of the dependancies (from current_pipeline.txt)
DEPS_DIR=()
for dep in ${DEPS[@]};
do
DEP=(`cat ${PIPE_ROOT}/current_pipeline.txt | grep ${dep}`)
DEPS_DIR=("${DEPS_DIR[@]}" "${DEP[1]}")
done
echo
echo ${DEPS_DIR[@]}
run_step.sh ${step_name} ${COMMIT} ${DEPS_DIR[@]}
# run the step (require setup, build, mounted volumes, pv and pvc !!)
run_step.sh ${step_name} ${COMMIT} "${DEPS_DIR[@]}"
done
......
......@@ -25,7 +25,7 @@ fi
# Check dependancies
if [ ! -z ${DEPS_DIR} ]
then
for dep_dir in ${DEPS_DIR[@]};
for dep_dir in "${DEPS_DIR[@]}";
do
if [ ! -d ${PIPE_ROOT}/${ARTIFACTS}/${dep_dir} ]
then
......@@ -35,13 +35,14 @@ then
done
fi
echo "DEPENDANCES: ${DEPS_DIR[@]}"
# setup tmp folder
TMP_HASH=$(gen_hash_word)
TMP_HASH=$(get_hash_from_word ${TMP_HASH})
echo ${TMP_HASH}
TMP_DIR="${PIPE_ROOT}/${ARTIFACTS}/.${STEP_NAME}_${TMP_HASH}"
echo "tmp-dir: ${TMP_DIR}"
mkdir ${TMP_DIR}
touch ${TMP_DIR}/trace.toml
......@@ -177,7 +178,7 @@ gen_dir_checksum ${TMP_DIR} ${TMP_DIR}/artifact_checksum.sha1 "True"
if [[ $? != 0 ]]; then echo "Error in making checksum of the Artifacts"; exit 1; fi;
ARTIFACT_HASH=$(gen_hash_from_checksum ${TMP_DIR}/artifact_checksum.sha1)
echo ${ARTIFACT_HASH} > ${TMP_DIR}/hash.sha1
echo ${ARTIFACT_HASH} > ${TMP_DIR}/artifact_hash.sha1
# rename the folder with the artifact short-hash
short_deps_hash=$(get_short_hash_from_word ${DEPS_HASH})
......
......@@ -236,8 +236,8 @@ function set_deps_hash() {
echo "artifact_hash = \"${artifact_hash}\"" >> ${TMP_DIR}/trace_deps.toml
# read full_dep_hash from folder: trace.toml
local DEP_TRACE_FILENAME=${PIPE_ROOT}/${ARTIFACTS}/${artifact}/trace.toml
local full_artifact_hash=`./stoml ${DEP_TRACE_FILENAME} ${dep_name}.artifact_hash`
local DEP_TRACE_FILENAME=${PIPE_ROOT}/${ARTIFACTS}/${artifact}/artifact_hash.sha1
local full_artifact_hash=$(cat ${DEP_TRACE_FILENAME})
echo "full_artifact_hash = \"${full_artifact_hash}\"" >> ${TMP_DIR}/trace_deps.toml
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment