From 83d939dd4323e84cea698a22f03178f78aee9cd7 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sun, 27 May 2018 08:42:36 -0500 Subject: [PATCH] Add ansible functional tests ansible now directly depends on and uses openstacksdk rather than shade. Make sure we don't land patches that break ansible. Remove the installation of ansible from run-ansible-tests as it's specified in the tox.ini file already, and we'll get it installed via tox-siblings in the gate. Depends-On: https://review.openstack.org/570956 Change-Id: I35103b8c75100725caf7a8fd264b81d402bf1973 --- .zuul.yaml | 32 ++++++++++++++++++++++++++++++++ extras/run-ansible-tests.sh | 3 --- tox.ini | 3 +++ 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 42109016b..fc698b904 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -199,6 +199,36 @@ OPENSTACKSDK_HAS_SWIFT: 0 OPENSTACKSDK_HAS_MAGNUM: 1 +- job: + name: openstacksdk-ansible-functional-devstack + parent: openstacksdk-functional-devstack + description: | + Run openstacksdk ansible functional tests against a master devstack + using released version of ansible. + vars: + tox_envlist: ansible + +- job: + name: openstacksdk-ansible-devel-functional-devstack + parent: openstacksdk-ansible-functional-devstack + description: | + Run openstacksdk ansible functional tests against a master devstack + using git devel branch version of ansible. + branches: ^(devel|master)$ + required-projects: + - name: github.com/ansible/ansible + override-checkout: devel + - name: openstack/openstacksdk + override-checkout: master + - name: openstack-dev/devstack + override-checkout: master + vars: + # test-matrix grabs branch from the zuul branch setting. If the job + # is triggered by ansible, that branch will be devel which doesn't + # make sense to devstack. Override so that we run the right thing. + test_matrix_branch: master + tox_install_siblings: true + - project-template: name: openstacksdk-functional-tips check: @@ -224,6 +254,8 @@ - build-openstack-sphinx-docs: vars: sphinx_python: python3 + - openstacksdk-ansible-devel-functional-devstack: + voting: false - openstacksdk-functional-devstack - openstacksdk-functional-devstack-magnum: voting: false diff --git a/extras/run-ansible-tests.sh b/extras/run-ansible-tests.sh index bda6007c9..f5a9c1679 100755 --- a/extras/run-ansible-tests.sh +++ b/extras/run-ansible-tests.sh @@ -69,9 +69,6 @@ then git clone --recursive https://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 diff --git a/tox.ini b/tox.ini index 62979df74..b58c8ddd4 100644 --- a/tox.ini +++ b/tox.ini @@ -71,6 +71,9 @@ commands = # Need to pass some env vars for the Ansible playbooks basepython = {env:OPENSTACKSDK_TOX_PYTHON:python2} passenv = HOME USER +deps = + {[testenv]deps} + ansible commands = {toxinidir}/extras/run-ansible-tests.sh -e {envdir} {posargs} [testenv:docs]