diff options
Diffstat (limited to 'jenkins')
-rwxr-xr-x | jenkins/clone.sh | 24 | ||||
-rwxr-xr-x | jenkins/prepare_synapse.sh | 19 |
2 files changed, 43 insertions, 0 deletions
diff --git a/jenkins/clone.sh b/jenkins/clone.sh new file mode 100755 index 0000000000..f56d076ea9 --- /dev/null +++ b/jenkins/clone.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +NAME=$1 +PROJECT=$2 +BASE=".$NAME-base" + +# update our clone +if [ ! -d .$NAME-base ]; then + git clone $PROJECT $BASE --mirror +else + (cd $BASE; git fetch -p) +fi + +rm -rf $NAME +git clone $BASE $NAME --shared + +: ${GIT_BRANCH:="origin/$(git rev-parse --abbrev-ref HEAD)"} +cd $NAME +# check out the relevant branch +git checkout "${GIT_BRANCH}" || ( + echo >&2 "No ref ${GIT_BRANCH} found, falling back to develop" + git checkout "origin/develop" +) +git clean -df . diff --git a/jenkins/prepare_synapse.sh b/jenkins/prepare_synapse.sh new file mode 100755 index 0000000000..237223c81b --- /dev/null +++ b/jenkins/prepare_synapse.sh @@ -0,0 +1,19 @@ +#! /bin/bash + +cd "`dirname $0`/.." + +TOX_DIR=$WORKSPACE/.tox + +mkdir -p $TOX_DIR + +if ! [ $TOX_DIR -ef .tox ]; then + ln -s "$TOX_DIR" .tox +fi + +# set up the virtualenv +tox -e py27 --notest -v + +TOX_BIN=$TOX_DIR/py27/bin +python synapse/python_dependencies.py | xargs -n1 $TOX_BIN/pip install +$TOX_BIN/pip install lxml +$TOX_BIN/pip install psycopg2 |