set -ex SYSTEM=$1 BUILDNUMBER=$2 BUILDSLAVE_SCRIPTS_SHA=$3 DEFINITIONS_SHA=$4 TESTING_SHA=$5 PIPELINE="$6" ARTEFACT="tlsa-ciat-test-x86_64_$BUILDNUMBER" echo "[$(date "+%F %R")] Deploy triggered with system $SYSTEM." >> ../../../../trigger_log sed "s/ARTEFACT/$ARTEFACT/" tlsa.morph > definitions/clusters/tlsa.morph git checkout $BUILDSLAVE_SCRIPTS_SHA if [ -d ybd-env ]; then rm -rf ybd-env fi virtualenv --no-site-packages ybd-env cd ybd-env ./bin/pip install pyyaml sandboxlib jsonschema requests git clone -n https://github.com/devcurmudgeon/ybd.git git --git-dir=./ybd/.git --work-tree=./ybd checkout 15.39 cp ../deploy_logic.py . cp ../deploy_a_system.sh . cp ../ybd.conf ybd cp ../ybd.conf ybd/config mv ../definitions . cd definitions git checkout $DEFINITIONS_SHA cd .. ./bin/python deploy_logic.py $SYSTEM $ARTEFACT $TESING_SHA "$PIPELINE"