diff --git a/.zuul.yaml b/.zuul.yaml index 35fa990..1096ce6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,11 +1,22 @@ - job: - name: ansible-role-nodepool - run: tests/test.yaml + name: ansible-role-nodepool-base + run: tests/playbooks/run.yaml post-run: tests/collect-logs.yaml required-projects: - name: openstack-infra/nodepool roles: - zuul: openstack/ansible-role-nodepool + vars: + # TODO(pabelanger): This needs to fix to defaut to this when not using + # a virtualenv. + nodepool_pip_executable: pip3 + +# Testing for nodepool_install_method: pip +- job: + name: ansible-role-nodepool + parent: ansible-role-nodepool-base + vars: + nodepool_install_method: pip - job: name: ansible-role-nodepool-fedora-27 @@ -22,6 +33,29 @@ parent: ansible-role-nodepool nodeset: ubuntu-xenial +# Testing for nodepool_install_method: git +- job: + name: ansible-role-nodepool-src + parent: ansible-role-nodepool-base + vars: + nodepool_git_update: false + nodepool_install_method: git + +- job: + name: ansible-role-nodepool-src-fedora-27 + parent: ansible-role-nodepool-src + nodeset: fedora-27 + +- job: + name: ansible-role-nodepool-src-ubuntu-bionic + parent: ansible-role-nodepool-src + nodeset: ubuntu-bionic + +- job: + name: ansible-role-nodepool-src-ubuntu-xenial + parent: ansible-role-nodepool-src + nodeset: ubuntu-xenial + - project: name: openstack/ansible-role-nodepool templates: @@ -33,9 +67,14 @@ - ansible-role-nodepool-fedora-27 - ansible-role-nodepool-ubuntu-bionic - ansible-role-nodepool-ubuntu-xenial + - ansible-role-nodepool-src-fedora-27 + - ansible-role-nodepool-src-ubuntu-bionic + - ansible-role-nodepool-src-ubuntu-xenial - tox-linters gate: jobs: - ansible-role-nodepool-fedora-27 - ansible-role-nodepool-ubuntu-xenial + - ansible-role-nodepool-src-fedora-27 + - ansible-role-nodepool-src-ubuntu-xenial - tox-linters diff --git a/tests/test.yaml b/tests/playbooks/run.yaml similarity index 98% rename from tests/test.yaml rename to tests/playbooks/run.yaml index b238886..6bfcbcd 100644 --- a/tests/test.yaml +++ b/tests/playbooks/run.yaml @@ -14,8 +14,6 @@ --- - hosts: all vars: - nodepool_git_update: false - nodepool_pip_executable: pip3 rolename: ansible-role-nodepool roles: @@ -139,12 +137,14 @@ stat: path: /home/zuul/src/git.openstack.org/openstack-infra/nodepool register: nodepool_git_dest_stat + when: nodepool_install_method == 'git' - name: Assert nodepool_git_dest tests. assert: that: - nodepool_git_dest_stat.stat.exists - nodepool_git_dest_stat.stat.isdir + when: nodepool_install_method == 'git' - name: Register /etc/systemd/system/nodepool-builder.service stat: