Merge "Improve linters execution"

This commit is contained in:
Zuul 2020-04-23 14:55:02 +00:00 committed by Gerrit Code Review
commit 33cba0e93b

View File

@ -40,9 +40,9 @@ whitelist_externals = bash
commands =
flake8 {posargs}
bash -c "find playbooks -type f -regex '.*.ya?ml' ! -regex '.*vars\/.*' -print0 | \
xargs -t -n1 -0 ansible-lint"
xargs -t -0 ansible-lint"
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d | \
xargs -t -n1 ansible-lint'
xargs -t ansible-lint'
# Ansible Syntax Check
bash -c "find playbooks -type f -regex '.*.ya?ml' ! -regex '.*vars\/.*' -exec \
ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \{\} + > /dev/null"
@ -50,7 +50,7 @@ commands =
{toxinidir}/tools/update-test-platforms.py
bash -c "(( $(find playbooks -name *.yml | wc -l) == 0)) || \{ echo 'Use .yaml'; exit 1; \}"
bash -c "(( $(find roles -name *.yml | wc -l) == 0)) || \{ echo 'Use .yaml'; exit 1; \}"
bash -c "git diff --quiet || \{ echo 'ERROR: git in dirty status, reporting as failure'; exit 1; \}"
bash -c "git diff --quiet || \{ git status --porcelain; echo 'ERROR: git in dirty status, reporting as failure'; exit 1; \}"
[testenv:venv]
commands = {posargs}