From d07d6d65ef2921a7e603ac16552afc3a51207ca8 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 18 Oct 2018 08:34:33 -0500 Subject: [PATCH] Add zuul to test-requirements for linting The linters env is picking up zuul-jobs content too, so we need to add zuul to get the zuul_ modules ... otherwise ansible-lint has a sad. Add zuul to test-requirements like is done in zuul-jobs. Then point the library path to zuul/ansible/library in the site-packages dir from tox so that we pick up the right files. Change-Id: I7a4f0159290d67354e0a73365091a0d1718762fd --- bindep.txt | 9 +++++++++ test-requirements.txt | 1 + tox.ini | 2 ++ zuul.d/jobs.yaml | 1 + 4 files changed, 13 insertions(+) diff --git a/bindep.txt b/bindep.txt index 83f339b3..116e2bac 100644 --- a/bindep.txt +++ b/bindep.txt @@ -5,3 +5,12 @@ libffi-devel [test platform:rpm] libffi-dev [test platform:dpkg] libssl-dev [platform:dpkg] openssl-devel [platform:rpm] +python3-dev [compile test platform:dpkg platform:apk] +python3-devel [compile test platform:rpm] +libre2-dev [compile test platform:dpkg] +libre2-4 [platform:ubuntu-bionic] +libre2-3 [platform:debian-stretch] +libre2-1v5 [platform:ubuntu-xenial] +re2-devel [compile test platform:rpm] +re2-dev [platform:apk] +re2 [platform:rpm platform:apk] diff --git a/test-requirements.txt b/test-requirements.txt index 32d85882..028615d6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,6 +4,7 @@ hacking>=0.12.0,<0.13 # Apache-2.0 +zuul ansible<2.4.0 ansible-lint bashate>=0.2 diff --git a/tox.ini b/tox.ini index dc5f5eac..3e19c18f 100644 --- a/tox.ini +++ b/tox.ini @@ -26,6 +26,8 @@ passenv = # to export ANSIBLE_ROLES_PATH pointing to the currect repos. # see openstack-zuul-jobs-linters job for more information. ANSIBLE_ROLES_PATH +setenv = + ANSIBLE_LIBRARY= {envsitepackagesdir}/zuul/ansible/library commands = flake8 {posargs} # Ansible lint diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 050c8693..0718f2ac 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -1190,6 +1190,7 @@ - openstack-infra/project-config - openstack-infra/system-config - openstack-infra/zuul-jobs + - openstack-infra/zuul vars: tox_envlist: linters tox_environment: