Skip to content

Commit

Permalink
tests: include the build steps to get images built
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Deza <adeza@redhat.com>
  • Loading branch information
Alfredo Deza committed Jan 11, 2017
1 parent e356c80 commit a807954
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/tox.sh
Expand Up @@ -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
Expand Down

0 comments on commit a807954

Please sign in to comment.