From 2d16acee4fb4f5f93c2167bf7822301c4abbd55d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 9 Dec 2016 09:21:25 +0100 Subject: [PATCH] Prepare for using standard py27 test Instead of setting up spark in the CI job, move the set up here so that it can be reused by other jobs as well. Create a test-setup.sh script that developer can also use to setup their own environment. This makes it easier for monasca-analytics to change the setup, documents the setup, and enables developer to reuse it. For details see: http://lists.openstack.org/pipermail/openstack-dev/2016-November/107784.html Change-Id: Id1a0b8d44d5a258746dd1f443610293163e64096 Needed-By: I0fdce1a977f59cdcb8c63c2b215316cbfcf4fef4 --- tools/test-setup.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tools/test-setup.sh diff --git a/tools/test-setup.sh b/tools/test-setup.sh new file mode 100755 index 0000000..65ba078 --- /dev/null +++ b/tools/test-setup.sh @@ -0,0 +1,15 @@ +#!/bin/bash -xe + +# This script will be run by OpenStack CI before unit tests are run, +# it sets up the test system as needed. +# Developers should setup their test systems in a similar way. + +HOME=${{HOME:-/home/jenkins}} +SPARK_DIR=$HOME/spark +SPARK_VERSION=${{SPARK_VERSION:-1.6.1}} +SPARK_TARBALL_NAME=spark-$SPARK_VERSION.tgz +SPARK_URL=http://archive.apache.org/dist/spark/spark-$SPARK_VERSION/$SPARK_TARBALL_NAME + +mkdir -p $SPARK_DIR +curl $SPARK_URL -o $SPARK_DIR/$SPARK_TARBALL_NAME +tar -xzf $SPARK_DIR/$SPARK_TARBALL_NAME -C $SPARK_DIR