Refactor jobs to support pip / git installation testing
Because we want users to support both pip / git install methods, refactor testing to support the testing of that. Change-Id: Ieef3763172fbfe07a5d0cc4c83c37a6dad30b3cd Depends-On: https://review.openstack.org/560996 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
7f5d52dc8b
commit
5efd428d9e
43
.zuul.yaml
43
.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
|
||||
|
@ -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:
|
Loading…
Reference in New Issue
Block a user