Ansible-lint project-config
Since project-config is trusted and thus not self-testing, add a new job for ansible linting in openstack-zuul-jobs and use this here. Once this job is stable, we can use the job openstack-zuul-jobs-linters job and merge the tox environments. Depends-On: I9fbfe70646f548b3ff1f3022933cab65481b347b Change-Id: I1243aa8344a4573e3c43c3ced45cf740a631efa9
This commit is contained in:
parent
b4f29d7110
commit
f4f7ff2b58
|
@ -1,3 +1,6 @@
|
|||
hacking>=0.10,<0.11
|
||||
bashate>=0.2
|
||||
-e git://git.openstack.org/openstack-infra/nodepool#egg=nodepool
|
||||
|
||||
ansible<2.4.0
|
||||
ansible-lint
|
||||
|
|
18
tox.ini
18
tox.ini
|
@ -14,6 +14,24 @@ commands =
|
|||
# Check that zuul.d/projects.yaml list is sorted
|
||||
{toxinidir}/tools/zuul-projects_sorted.sh
|
||||
|
||||
[testenv:ansible-linters]
|
||||
# TODO(jaegerandi): merge this in linters job once it works fine
|
||||
whitelist_externals = bash
|
||||
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 infra-zuul-jobs-linters job for more information.
|
||||
ANSIBLE_ROLES_PATH
|
||||
commands =
|
||||
# Ansible lint
|
||||
# [ANSIBLE0012] Commands should not change things if nothing needs doing
|
||||
bash -c "find playbooks -type d -name "legacy" -prune -o \
|
||||
-type f -regex '.*.y[a]ml' -print0 | xargs -t -n1 -0 \
|
||||
ansible-lint -xANSIBLE0012"
|
||||
# Ansible Syntax Check
|
||||
bash -c "cd playbooks; find . -type f -regex '.*.y[a]?ml' -exec \
|
||||
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null"
|
||||
|
||||
[testenv:gerrit]
|
||||
deps = PyYAML
|
||||
GitPython
|
||||
|
|
|
@ -1013,6 +1013,8 @@
|
|||
- project-config-infra-docs-index
|
||||
- project-config-irc-access
|
||||
- project-config-nodepool
|
||||
- project-config-zuul-jobs-linters:
|
||||
voting: false
|
||||
- zuul-migrate:
|
||||
files:
|
||||
- zuul/mapping.yaml
|
||||
|
|
Loading…
Reference in New Issue