linters: Take a guess at the roles path

It's probably reasonable to assume that for interactive use, the
required roles for linting in zuul-jobs and openstack-zuul-jobs are in
sibling directories of project-config.  Set this as the default
environment value.

Change-Id: I388fdae998ac3cb87c30616ed761c888e1e429f0
This commit is contained in:
Ian Wienand 2018-08-10 14:27:56 +10:00
parent bb00ab0e00
commit f78146bac6
1 changed files with 11 additions and 4 deletions

15
tox.ini
View File

@ -12,11 +12,18 @@ basepython = python3
whitelist_externals = bash
setenv =
ANSIBLE_LIBRARY= {envdir}/src/zuul/zuul/ansible/library
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.
# 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.
ANSIBLE_ROLES_PATH
ANSIBLE_ROLES_PATH={env:ANSIBLE_ROLES_PATH:../zuul-jobs/roles:../openstack-zuul-jobs/roles:roles}
# Add dependencies here since other jobs use python2 and zuul requires
# python3.
deps =