diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..9142bcd --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,41 @@ +- job: + name: ansible-role-nodepool + run: tests/test + required-projects: + - name: openstack-infra/nodepool + override-branch: feature/zuulv3 + roles: + - zuul: openstack/ansible-role-nodepool + +- job: + name: ansible-role-nodepool-centos-7 + parent: ansible-role-nodepool + nodeset: centos-7 + +- job: + name: ansible-role-nodepool-fedora-26 + parent: ansible-role-nodepool + nodeset: fedora-26 + +- job: + name: ansible-role-nodepool-ubuntu-xenial + parent: ansible-role-nodepool + nodeset: ubuntu-xenial + +- project: + name: openstack/ansible-role-nodepool + templates: + - windmill-jobs-fedora-26 + - windmill-jobs-xenial + check: + jobs: + - ansible-role-nodepool-centos-7 + - ansible-role-nodepool-fedora-26 + - ansible-role-nodepool-ubuntu-xenial + - tox-linters + gate: + jobs: + - ansible-role-nodepool-centos-7 + - ansible-role-nodepool-fedora-26 + - ansible-role-nodepool-ubuntu-xenial + - tox-linters diff --git a/tests/ansible.cfg b/tests/ansible.cfg deleted file mode 100644 index 6c8a344..0000000 --- a/tests/ansible.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[defaults] -roles_path = ../.. diff --git a/tests/inventory b/tests/inventory index 68b2dac..2fbb50c 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,2 +1 @@ -[all] localhost diff --git a/tests/test.yaml b/tests/test.yaml index 3f6393d..06decce 100644 --- a/tests/test.yaml +++ b/tests/test.yaml @@ -12,16 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. --- -- hosts: localhost +- hosts: all vars: - rolename: "{{ lookup('pipe', 'pwd') | dirname | basename }}" - pre_tasks: - # Make sure OS does not have a stale package cache. - - name: Update apt cache. - become: yes - apt: - update_cache: yes - when: ansible_os_family == 'Debian' + nodepool_git_dest: "{{ ansible_user_dir }}/src/git.openstack.org/openstack-infra/nodepool" + nodepool_git_update: false + rolename: ansible-role-nodepool roles: - "{{ rolename }}" @@ -142,7 +137,7 @@ - name: Register nodepool_git_dest_stat. stat: - path: /opt/ansible-role-nodepool/git/openstack-infra/nodepool + path: /home/zuul/src/git.openstack.org/openstack-infra/nodepool register: nodepool_git_dest_stat - name: Assert nodepool_git_dest tests. diff --git a/tox.ini b/tox.ini index 60b7f91..e56c12f 100644 --- a/tox.ini +++ b/tox.ini @@ -34,7 +34,7 @@ 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