diff options
author | Parménides GV <parmegv@sdf.org> | 2015-08-06 11:02:04 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2015-08-06 11:02:04 +0200 |
commit | 62db2c8dc829e5fbd258b6f4e3aec93da183d433 (patch) | |
tree | bdc75c1dea88b755a55935b8b32010eb99b556fc | |
parent | faf9d89fd7e2f481a564390249bdf5dfb2994279 (diff) |
[feat] Script to update buildbot
If the virtualenv exists, then don't recreate it.
If the buildbot git repo is already cloned, don't setup but update.
-rwxr-xr-x | setup.sh | 13 | ||||
-rw-r--r-- | update_buildbot.sh | 29 |
2 files changed, 40 insertions, 2 deletions
@@ -4,13 +4,21 @@ base_dir=`pwd` virtualenv_directory=$base_dir/sandbox -virtualenv --python=python2 $virtualenv_directory +if [[ ! -d $virtualenv_directory ]]; then + virtualenv --python=python2 $virtualenv_directory +fi virtualenv_bin=$virtualenv_directory/bin PATH=$virtualenv_directory/bin:$PATH buildbot_sources=buildbot-sources -git clone --depth 1 git://github.com/buildbot/buildbot.git $buildbot_sources +if [[ -d buildbot-sources/.git ]]; then + ./update.sh + exit 0 +else + git clone --depth 1 git://github.com/buildbot/buildbot.git $buildbot_sources +fi + cd $buildbot_sources pip install -e master pip install -e slave @@ -26,3 +34,4 @@ slave_name="localhost_slave" slave_password=`python2 -c "from passwords import *; print PASSWORDS['$slave_name']"` echo $slave_password buildslave create-slave slave localhost:9989 $slave_name $slave_password +echo -e "\tMove the slave to another user's home directory and execute from there" diff --git a/update_buildbot.sh b/update_buildbot.sh new file mode 100644 index 0000000..c934765 --- /dev/null +++ b/update_buildbot.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +base_dir=`pwd` +virtualenv_directory=$base_dir/sandbox +if [[ ! -d $virtualenv_directory ]]; then + virtualenv --python=python2 $virtualenv_directory +fi + +virtualenv_bin=$virtualenv_directory/bin +PATH=$virtualenv_directory/bin:$PATH + +buildbot_sources=buildbot-sources +if [[ ! -d buildbot-sources/.git ]]; then + git clone --depth 1 git://github.com/buildbot/buildbot.git $buildbot_sources +else + cd $buildbot_sources + git pull + cd - +fi + +cd $buildbot_sources +pip install -e master +pip install -e slave +make prebuild_frontend +cd - + +buildbot stop master +buildbot upgrade-master master +buildbot start master |