From a807954267eea7f13f0b8fbeb80780c439b4e6ae Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 10 Jan 2017 17:08:47 -0500 Subject: [PATCH] tests: include the build steps to get images built Signed-off-by: Alfredo Deza --- tests/tox.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/tox.sh b/tests/tox.sh index 08c2bc3ae..ba1819a07 100644 --- a/tests/tox.sh +++ b/tests/tox.sh @@ -9,12 +9,32 @@ # setup ################################################################################# +sudo apt-get install -y --force-yes docker.io +sudo apt-get install -y --force-yes xfsprogs git clone -b $CEPH_ANSIBLE_BRANCH --single-branch https://github.com/ceph/ceph-ansible.git ceph-ansible pip install -r $TOXINIDIR/ceph-ansible/tests/requirements.txt +# pull requests tests should never have these directories here, but branches +# do, so for the build scripts to work correctly, these neeed to be removed +# XXX It requires sudo because these will appear with `root` ownership +sudo rm -rf "$WORKSPACE"/{daemon,demo,base} + +sudo "$WORKSPACE"/travis-builds/purge_cluster.sh +# XXX purge_cluster only stops containers, it doesn't really remove them so try to +# remove them for real +containers_to_remove=$(sudo docker ps -a -q) + +if [ "${containers_to_remove}" ]; then + sudo docker rm -f $@ ${containers_to_remove} || echo failed to remove containers +fi + +sudo "$WORKSPACE"/travis-builds/build_imgs.sh + # test ################################################################################# +# TODO: get the output image from build_imgs.sh to pass onto ceph-ansible + # vars ################################################################################# ANSIBLE_SSH_ARGS = -F $CEPH_ANSIBLE_SCENARIO_PATH/vagrant_ssh_config