summaryrefslogtreecommitdiff
path: root/scripts/docker/files/setup-env.sh
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2016-06-10 22:07:35 -0300
committerdrebs <drebs@leap.se>2016-06-22 17:51:18 -0300
commit78d61dfaadf9bcac7258a33738c660b238b7bf27 (patch)
tree9cb2797e0cf0b09335be32d4f54b1e6d583a9558 /scripts/docker/files/setup-env.sh
parente14f17247ce03f1c49cab3c944039ff9aba84f64 (diff)
[test] refactor of docker scripts
Diffstat (limited to 'scripts/docker/files/setup-env.sh')
-rwxr-xr-xscripts/docker/files/setup-env.sh55
1 files changed, 0 insertions, 55 deletions
diff --git a/scripts/docker/files/setup-env.sh b/scripts/docker/files/setup-env.sh
deleted file mode 100755
index d5aeab7d..00000000
--- a/scripts/docker/files/setup-env.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-
-# Clone soledad repository and install soledad dependencies needed to run
-# client and server in a test environment.
-#
-# In details, this script does the following:
-#
-# - clone a series of python package repositories into /var/local/soledad.
-# - install dependencies for those packages from the requirements files in
-# each of the repositories, using python wheels when possible.
-# - install the python packages in development mode
-#
-# The cloned git repositories might have a remote configured and a branch
-# checked out on runtime, before a server, client or test instance is actually
-# run. Check the other scripts in this directory.
-#
-# This script is meant to be copied to the docker container and run after
-# system dependencies have been installed.
-
-BASEDIR="/var/local"
-BASEURL="https://github.com/leapcode"
-
-mkdir -p ${BASEDIR}
-
-# clone repositories
-repos="soledad leap_pycommon soledad-perf"
-
-for repo in ${repos}; do
- repodir=${BASEDIR}/${repo}
- if [ ! -d ${repodir} ]; then
- git clone ${BASEURL}/${repo} ${repodir}
- git -C ${repodir} fetch origin
- fi
-done
-
-# use latest pip because the version available in debian jessie doesn't
-# support wheels
-pip install -U pip
-
-pip install psutil
-
-# install dependencies and packages
-install_script="pkg/pip_install_requirements.sh"
-opts="--use-leap-wheels"
-pkgs="leap_pycommon soledad/common soledad/client soledad/server"
-
-for pkg in ${pkgs}; do
- pkgdir=${BASEDIR}/${pkg}
- testing=""
- if [ -f ${pkgdir}/pkg/requirements-testing.pip ]; then
- testing="--testing"
- fi
- (cd ${pkgdir} && ${install_script} ${testing} ${opts})
- (cd ${pkgdir} && python setup.py develop)
-done