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: I0bbf19539ad3807297c87ae078d6602cf2347e41 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
3171a229be
commit
152cfe5c6f
44
.zuul.yaml
44
.zuul.yaml
|
@ -1,11 +1,17 @@
|
|||
- job:
|
||||
name: ansible-role-gearman
|
||||
run: tests/test.yaml
|
||||
required-projects:
|
||||
- name: openstack-infra/gear
|
||||
name: ansible-role-gearman-base
|
||||
pre-run: tests/playbooks/pre.yaml
|
||||
run: tests/playbooks/run.yaml
|
||||
roles:
|
||||
- zuul: openstack/ansible-role-gearman
|
||||
|
||||
# Testing for gearman_install_method: pip
|
||||
- job:
|
||||
name: ansible-role-gearman
|
||||
parent: ansible-role-gearman-base
|
||||
vars:
|
||||
gear_install_method: pip
|
||||
|
||||
- job:
|
||||
name: ansible-role-gearman-fedora-27
|
||||
parent: ansible-role-gearman
|
||||
|
@ -21,6 +27,31 @@
|
|||
parent: ansible-role-gearman
|
||||
nodeset: ubuntu-xenial
|
||||
|
||||
# Testing for gearman_install_method: git
|
||||
- job:
|
||||
name: ansible-role-gearman-src
|
||||
parent: ansible-role-gearman-base
|
||||
required-projects:
|
||||
- name: openstack-infra/gear
|
||||
vars:
|
||||
gear_git_update: false
|
||||
gear_install_method: git
|
||||
|
||||
- job:
|
||||
name: ansible-role-gearman-src-fedora-27
|
||||
parent: ansible-role-gearman-src
|
||||
nodeset: fedora-27
|
||||
|
||||
- job:
|
||||
name: ansible-role-gearman-src-ubuntu-bionic
|
||||
parent: ansible-role-gearman-src
|
||||
nodeset: ubuntu-bionic
|
||||
|
||||
- job:
|
||||
name: ansible-role-gearman-src-ubuntu-xenial
|
||||
parent: ansible-role-gearman-src
|
||||
nodeset: ubuntu-xenial
|
||||
|
||||
- project:
|
||||
templates:
|
||||
- windmill-jobs-fedora-27
|
||||
|
@ -31,9 +62,14 @@
|
|||
- ansible-role-gearman-fedora-27
|
||||
- ansible-role-gearman-ubuntu-bionic
|
||||
- ansible-role-gearman-ubuntu-xenial
|
||||
- ansible-role-gearman-src-fedora-27
|
||||
- ansible-role-gearman-src-ubuntu-bionic
|
||||
- ansible-role-gearman-src-ubuntu-xenial
|
||||
- tox-linters
|
||||
gate:
|
||||
jobs:
|
||||
- ansible-role-gearman-fedora-27
|
||||
- ansible-role-gearman-ubuntu-xenial
|
||||
- ansible-role-gearman-src-fedora-27
|
||||
- ansible-role-gearman-src-ubuntu-xenial
|
||||
- tox-linters
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
- hosts: all
|
||||
tasks:
|
||||
- name: Disable extra wheels mirror
|
||||
become: yes
|
||||
lineinfile:
|
||||
dest: /etc/pip.conf
|
||||
regexp: ^extra-index-url
|
||||
state: absent
|
|
@ -14,7 +14,6 @@
|
|||
---
|
||||
- hosts: all
|
||||
vars:
|
||||
gear_git_update: false
|
||||
rolename: ansible-role-gearman
|
||||
|
||||
roles:
|
||||
|
@ -61,12 +60,14 @@
|
|||
stat:
|
||||
path: /home/zuul/src/git.openstack.org/openstack-infra/gear
|
||||
register: gear_git_dest_stat
|
||||
when: gear_install_method == 'git'
|
||||
|
||||
- name: Assert gear_git_dest tests.
|
||||
assert:
|
||||
that:
|
||||
- gear_git_dest_stat.stat.exists
|
||||
- gear_git_dest_stat.stat.isdir
|
||||
when: gear_install_method == 'git'
|
||||
|
||||
- name: Register /etc/gear/ssl/root-ca.pem
|
||||
stat:
|
Loading…
Reference in New Issue