summaryrefslogtreecommitdiff
path: root/triggers/deploy_trigger.sh
blob: 6f33d67f634c3d4bdb584604f286d87e87eb3719 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
set -ex
SYSTEM=$1
BUILDNUMBER=$2
BUILDSLAVE_SCRIPTS_SHA=$3
DEFINITIONS_SHA=$4
TESTING_SHA=$5
PIPELINE="$6"
ARTEFACT="ciat-test-x86_64_$BUILDNUMBER"
echo "[$(date "+%F %R")] Deploy triggered with system $SYSTEM." >> ../../../../trigger_log
sed "s/ARTEFACT/$ARTEFACT/" ciat-test-cluster.morph > definitions/clusters/ciat-test-cluster.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 $TESTING_SHA "$DEFINITIONS_SHA" "$TESTING_SHA" "$PIPELINE"