From db91063c2c87f6afe7a7628ce1b4a6fc7ee572da Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 8 Feb 2016 12:50:35 -0500 Subject: [PATCH] Import ansible-role-jenkins into OpenStack Here we are updating the gitreview file and using the new tox.ini env to pass the gate. Change-Id: I7b651d0e74374d3516fef96424b24be150918a78 Signed-off-by: Paul Belanger --- .gitreview | 2 +- tox.ini | 29 +++++++++++++++-------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.gitreview b/.gitreview index cdc80e2..2a00977 100644 --- a/.gitreview +++ b/.gitreview @@ -1,4 +1,4 @@ [gerrit] host=review.openstack.org port=29418 -project=openstack/ansible-role-nodepool.git +project=openstack/ansible-role-jenkins.git diff --git a/tox.ini b/tox.ini index c2f82cf..cd1cd13 100644 --- a/tox.ini +++ b/tox.ini @@ -1,23 +1,12 @@ [tox] minversion = 1.6 -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:ansible-functional] commands = ansible-playbook -i tests/inventory tests/test.yaml @@ -29,8 +18,20 @@ setenv = [testenv:docs] commands = python setup.py build_sphinx -[testenv:pep8] -commands = flake8 +[testenv:linters] +setenv = + ANSIBLE_CONFIG = tests/ansible.cfg +whitelist_externals = bash +commands = + # PEP8 Lint Check + flake8 + # Ansible List Check + bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \ + ansible-lint" + # Ansible Syntax Check + 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}