From e0c347ace356bf0f5085d0eea3f0a3c106cb6721 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 17 Apr 2019 13:15:37 +0000 Subject: [PATCH] Use zuul-jobs roles path for linters We need the roles from zuul-jobs for linting our playbooks. This is copied from project-config. In order to satisfy that, add zuul-jobs to the required projects so that it'll get cloned and pushed to the test node. Change-Id: Ib2e2a6a4b05071199e14570c445dc1a2eda9e9b7 --- tox.ini | 18 +++++++++++++----- zuul.yaml | 6 ++++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/tox.ini b/tox.ini index a412b6b..f535f5b 100644 --- a/tox.ini +++ b/tox.ini @@ -18,14 +18,22 @@ commands = sphinx-build -E -W -d doc/build/doctrees -b html doc/source/ doc/build/html [testenv:linters] -passenv = - # NOTE(pabelanger): if you'd like to run tox -elinters locally, you'll need - # 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/base/library ANSIBLE_ACTION_PLUGINS = {envsitepackagesdir}/zuul/ansible/base/actiongeneral + # NOTE(pabelanger): if you'd like to run tox -elinters locally, + # you'll need to export ANSIBLE_ROLES_PATH pointing to the required + # repos. + # + # We take a guess that zuul-jobs and openstack-zuul-jobs will be + # checked out in the directory above us (i.e. alongside + # project-config). You may need to override this. Make sure + # they're up to date too! + # + # see openstack-zuul-jobs-linters job for more information. + # TODO(mordred) We'll need to update this for the opendev zuul rename - but + # I'm not sure if fungi's script will catch it. + ANSIBLE_ROLES_PATH = {env:ANSIBLE_ROLES_PATH:{toxinidir}/../../openstack-infra/zuul-jobs/roles:roles} whitelist_externals = bash commands = flake8 {posargs} diff --git a/zuul.yaml b/zuul.yaml index 5917be9..47d9922 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -430,11 +430,13 @@ check: jobs: - opendev-tox-docs - - tox-linters + - tox-linters: + required-projects: openstack-infra/zuul-jobs gate: jobs: - opendev-tox-docs - - tox-linters + - tox-linters: + required-projects: openstack-infra/zuul-jobs promote: jobs: - opendev-promote-docs