summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Holland <william.holland@codethink.co.uk>2015-09-28 07:09:31 +0100
committerWill Holland <william.holland@codethink.co.uk>2015-09-28 07:09:31 +0100
commitc7fc5119f3b12effdf83e6347324480437ae88ea (patch)
treeef7c637a9b22c81b9c96e99c063848f83c379f22
parentf21dc408431736857418aea1a2cb25cca6dfb3c4 (diff)
downloadbuildslave-scripts-c7fc5119f3b12effdf83e6347324480437ae88ea.tar.gz
Clean up ybd virtualenv
By making ybd run in a virtualenv for deploy as well as build, installing all needed packages and not installing pip global
-rwxr-xr-xprep_for_ybd.sh7
-rw-r--r--triggers/builders_trigger.sh3
-rw-r--r--triggers/deploy_trigger.sh14
3 files changed, 14 insertions, 10 deletions
diff --git a/prep_for_ybd.sh b/prep_for_ybd.sh
index 28e7ad8..24c9a70 100755
--- a/prep_for_ybd.sh
+++ b/prep_for_ybd.sh
@@ -3,13 +3,10 @@
# Script to set up yum-y or apt-y machine for ybd use
if [ -x /usr/bin/apt ]; then
- apt-get install -y make automake gcc g++ linux-headers-$(uname -r) git gawk python-pip
+ apt-get install -y make automake gcc g++ linux-headers-$(uname -r) git gawk python-virtualenv
elif [ -x /usr/bin/yum ]; then
- yum install -y make automake gcc gcc-c++ kernel-devel git gawk python-pip
+ yum install -y make automake gcc gcc-c++ kernel-devel git gawk python-virtualenv
else
echo "Unsuported package manager, try apt or yum."
exit 1
fi
-
-pip install pyyaml sandboxlib jsonschema requests
-
diff --git a/triggers/builders_trigger.sh b/triggers/builders_trigger.sh
index 6aa9647..c11ffac 100644
--- a/triggers/builders_trigger.sh
+++ b/triggers/builders_trigger.sh
@@ -9,8 +9,7 @@ if [ -d ybd-env ]; then
fi
virtualenv --no-site-packages ybd-env
cd ybd-env
-./bin/pip install sandboxlib
-./bin/pip install requests
+./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 ../builder_logic.py .
diff --git a/triggers/deploy_trigger.sh b/triggers/deploy_trigger.sh
index e9739b1..dab3364 100644
--- a/triggers/deploy_trigger.sh
+++ b/triggers/deploy_trigger.sh
@@ -11,11 +11,19 @@ git checkout $BUILDSLAVE_SCRIPTS_SHA
cd definitions
git checkout $DEFINITIONS_SHA
cd ..
-if [ -d ybd ]; then
- rm -rf ybd
+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
-python deploy_logic.py $SYSTEM $ARTEFACT $TESING_SHA
+if [ -d ybd ]; then
+ rm -rf ybd
+fi
+./bin/python deploy_logic.py $SYSTEM $ARTEFACT $TESING_SHA