Add in-tree zuul jobs
This adds native zuulv3 jobs for testing. Change-Id: Icd985d84ead1dca51c355ef20a70b566211564f5 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
519057ecdf
commit
2b5eb35056
10
.zuul.yaml
10
.zuul.yaml
|
@ -1,6 +1,6 @@
|
|||
- job:
|
||||
name: ansible-role-logrotate
|
||||
run: tests/test.yaml
|
||||
run: tests/playbooks/run.yaml
|
||||
roles:
|
||||
- zuul: openstack/ansible-role-logrotate
|
||||
|
||||
|
@ -9,6 +9,11 @@
|
|||
parent: ansible-role-logrotate
|
||||
nodeset: fedora-27
|
||||
|
||||
- job:
|
||||
name: ansible-role-logrotate-ubuntu-bionic
|
||||
parent: ansible-role-logrotate
|
||||
nodeset: ubuntu-bionic
|
||||
|
||||
- job:
|
||||
name: ansible-role-logrotate-ubuntu-xenial
|
||||
parent: ansible-role-logrotate
|
||||
|
@ -17,14 +22,17 @@
|
|||
- project:
|
||||
templates:
|
||||
- windmill-jobs-fedora-27
|
||||
- windmill-jobs-bionic
|
||||
- windmill-jobs-xenial
|
||||
check:
|
||||
jobs:
|
||||
- ansible-role-logrotate-fedora-27
|
||||
- ansible-role-logrotate-ubuntu-bionic
|
||||
- ansible-role-logrotate-ubuntu-xenial
|
||||
- tox-linters
|
||||
gate:
|
||||
jobs:
|
||||
- ansible-role-logrotate-fedora-27
|
||||
- ansible-role-logrotate-ubuntu-bionic
|
||||
- ansible-role-logrotate-ubuntu-xenial
|
||||
- tox-linters
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
[all]
|
||||
localhost ansible_connection=ssh
|
||||
localhost
|
||||
|
|
25
tox.ini
25
tox.ini
|
@ -7,19 +7,14 @@ skipsdist = True
|
|||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:functional]
|
||||
commands =
|
||||
# NOTE(pabelanger): Because ansible default ansible_user to null now, we need to pass it via CLI.
|
||||
ansible-playbook -i tests/inventory tests/test.yaml -e ansible_user={env:USER}
|
||||
passenv =
|
||||
HOME
|
||||
USER
|
||||
setenv =
|
||||
ANSIBLE_CONFIG = {toxinidir}/tests/ansible.cfg
|
||||
PYTHONUNBUFFERED = 1
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
whitelist_externals =
|
||||
bash
|
||||
commands=
|
||||
bash -c "rm -rf doc/build"
|
||||
doc8 doc
|
||||
sphinx-build -b html doc/source doc/build/html
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
@ -34,14 +29,14 @@ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
|||
|
||||
[testenv:linters]
|
||||
setenv =
|
||||
ANSIBLE_CONFIG = tests/ansible.cfg
|
||||
ANSIBLE_ROLES_PATH = ..
|
||||
whitelist_externals = bash
|
||||
commands =
|
||||
# PEP8 Lint Check
|
||||
flake8
|
||||
# Ansible Lint Check
|
||||
bash -c "find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
|
||||
ansible-lint"
|
||||
bash -c "find . -not -path '*/\.*' -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 \
|
||||
|
|
Loading…
Reference in New Issue