From 8a1be893c266acb7a3abe7830f47bc37fd408bfa Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Wed, 10 Feb 2016 16:47:05 -0500 Subject: [PATCH] Add ansible-role-jenkins-plugins to OpenStack Change-Id: Ib27d78a1e2d0e1cb0dfb8ee215fa1e639221bfb9 Signed-off-by: Paul Belanger --- .gitreview | 4 ++++ tox.ini | 40 +++++++++++++++++++++++----------------- 2 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 .gitreview diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..e1b0b27 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=openstack/ansible-role-jenkins-plugins.git diff --git a/tox.ini b/tox.ini index 23d78a3..c3add41 100644 --- a/tox.ini +++ b/tox.ini @@ -1,24 +1,16 @@ [tox] minversion = 1.4.2 -envlist = ansible-lint,docs,pep8 +envlist = docs,linters skipsdist = True [testenv] deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -[testenv:ansible-lint] -setenv = - ANSIBLE_CONFIG = tests/ansible.cfg -whitelist_externals = bash -commands = - bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \ - ansible-lint" - bash -c "find tests -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \ - ansible-playbook --syntax-check -i tests/inventory \ - -e rolename=$(basename $(pwd)) > /dev/null" +[testenv:docs] +commands = python setup.py build_sphinx -[testenv:ansible-functional] +[testenv:functional] commands = ansible-playbook -i tests/inventory tests/test.yaml passenv = HOME @@ -26,11 +18,25 @@ setenv = ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg PYTHONUNBUFFERED = 1 -[testenv:docs] -commands = python setup.py build_sphinx - -[testenv:pep8] -commands = flake8 +[testenv:linters] +setenv = + ANSIBLE_CONFIG = tests/ansible.cfg +whitelist_externals = bash +commands = + flake8 + bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \ + ansible-lint" + bash -c "find tests -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \ + ansible-playbook --syntax-check -i tests/inventory \ + -e rolename=$(basename $(pwd)) > /dev/null" [testenv:venv] commands = {posargs} + +[flake8] +# E123, E125 skipped as they are invalid PEP-8. + +show-source = True +ignore = E123,E125 +builtins = _ +exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build