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
This commit is contained in:
Monty Taylor 2019-04-17 13:15:37 +00:00
parent fb14f0cc36
commit e0c347ace3
2 changed files with 17 additions and 7 deletions

18
tox.ini
View File

@ -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}

View File

@ -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