From d69288b1a2fcb17dff96e088e9a77a340b8d4d06 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 8 Jan 2018 16:39:38 -0600 Subject: [PATCH] List ansible/ansible in required-projects The ansible-devel functional test intends to run against tip of ansible devel. Let Zuul handle that and depends-on once cross-source depends exist by listing ansible/ansible as a required-project. Remove the special install handling, as tox-install-siblings should be taking care of it now. Change-Id: I93459ffc116f9106d9eb8000a7e5a58bea507308 Depends-On: Ib5e35315fc9ffe6fa8873ad4975309d9820e1feb Depends-On: I6d234247e3d45befd264e159c8b0fe77f01c7fdc --- .zuul.yaml | 5 +++-- extras/run-ansible-tests.sh | 26 +------------------------- tox.ini | 5 +++++ 3 files changed, 9 insertions(+), 27 deletions(-) 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]