From d4cce7369f72f2c73708fbf894f38c0873baf2ed Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 1 Sep 2017 15:28:17 +0100 Subject: [PATCH] Add scripts to run sytest on jenkins (#207) --- jenkins/prepare-dendrite.sh | 13 +++++++++++++ jenkins/test-monolith.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100755 jenkins/prepare-dendrite.sh create mode 100755 jenkins/test-monolith.sh diff --git a/jenkins/prepare-dendrite.sh b/jenkins/prepare-dendrite.sh new file mode 100755 index 000000000..baa03abdd --- /dev/null +++ b/jenkins/prepare-dendrite.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# +# build the dendrite binaries into ./bin + +cd `dirname $0`/.. + +set -eux + +export GOPATH=`pwd`/.gopath +export PATH="${GOPATH}/bin:$PATH" + +go get github.com/constabulary/gb/... +gb build diff --git a/jenkins/test-monolith.sh b/jenkins/test-monolith.sh new file mode 100755 index 000000000..344fdd3aa --- /dev/null +++ b/jenkins/test-monolith.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -eux + +cd `dirname $0`/.. + +: ${WORKSPACE:="$(pwd)"} +export WORKSPACE + +# remove any detritus from last time +rm -f sytest/server-*/*.log sytest/results.tap + +./jenkins/prepare-dendrite.sh + +if [ ! -d "sytest" ]; then + git clone https://github.com/matrix-org/sytest.git --depth 1 --branch dendrite +else + git -C sytest fetch --depth 1 origin dendrite + git -C sytest reset --hard FETCH_HEAD +fi + +./sytest/jenkins/prep_sytest_for_postgres.sh + +./sytest/jenkins/install_and_run.sh \ + -I Dendrite::Monolith \ + --dendrite-binary-directory "$WORKSPACE/bin" || true