diff --git a/.zuul.yaml b/.zuul.yaml index 81bef7588..eb5e79770 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -188,8 +188,9 @@ description: | Run shade ansible functional tests against a master devstack using git devel branch version of ansible. - # required-projects: - # - github.com/ansible/ansible + required-projects: + - name: github.com/ansible/ansible + override-branch: devel voting: false vars: tox_install_siblings: true diff --git a/extras/run-ansible-tests.sh b/extras/run-ansible-tests.sh index 37573b29d..f804f7f94 100755 --- a/extras/run-ansible-tests.sh +++ b/extras/run-ansible-tests.sh @@ -8,14 +8,11 @@ # tox -e ansible [TAG ...] # or # tox -e ansible -- -c cloudX [TAG ...] -# or to use the development version of Ansible: -# tox -e ansible -- -d -c cloudX [TAG ...] # # USAGE: -# run-ansible-tests.sh -e ENVDIR [-d] [-c CLOUD] [TAG ...] +# run-ansible-tests.sh -e ENVDIR [-c CLOUD] [TAG ...] # # PARAMETERS: -# -d Use Ansible source repo development branch. # -e ENVDIR Directory of the tox environment to use for testing. # -c CLOUD Name of the cloud to use for testing. # Defaults to "devstack-admin". @@ -33,12 +30,10 @@ CLOUD="devstack-admin" ENVDIR= -USE_DEV=0 while getopts "c:de:" opt do case $opt in - d) USE_DEV=1 ;; c) CLOUD=${OPTARG} ;; e) ENVDIR=${OPTARG} ;; ?) echo "Invalid option: -${OPTARG}" @@ -55,25 +50,6 @@ fi shift $((OPTIND-1)) TAGS=$( echo "$*" | tr ' ' , ) -# We need to source the current tox environment so that Ansible will -# be setup for the correct python environment. -source $ENVDIR/bin/activate - -if [ ${USE_DEV} -eq 1 ] -then - if [ -d ${ENVDIR}/ansible ] - then - echo "Using existing Ansible source repo" - else - echo "Installing Ansible source repo at $ENVDIR" - git clone --recursive git://github.com/ansible/ansible.git ${ENVDIR}/ansible - fi - source $ENVDIR/ansible/hacking/env-setup -else - echo "Installing Ansible from pip" - pip install ansible -fi - # Run the shade Ansible tests tag_opt="" if [ ! -z ${TAGS} ] diff --git a/tox.ini b/tox.ini index 2e3a38bfe..38b640a5c 100644 --- a/tox.ini +++ b/tox.ini @@ -59,6 +59,11 @@ commands = [testenv:ansible] # Need to pass some env vars for the Ansible playbooks passenv = HOME USER +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + ansible commands = {toxinidir}/extras/run-ansible-tests.sh -e {envdir} {posargs} [testenv:docs]