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: I8c6bfa94b22af73f84ead571d04181e4cfb8330e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-04-12 21:19:41 -04:00
parent d701975a50
commit 65e23fa622
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
3 changed files with 41 additions and 5 deletions

View File

@ -1,13 +1,18 @@
- job:
name: ansible-role-zuul
name: ansible-role-zuul-base
parent: unittests
run: tests/test.yaml
run: tests/playbooks/run.yaml
post-run: tests/collect-logs.yaml
required-projects:
- name: openstack-infra/zuul
roles:
- zuul: openstack/ansible-role-zuul
# Testing for zuul_install_method: pip
- job:
name: ansible-role-zuul
parent: ansible-role-zuul-base
vars:
zuul_install_method: pip
- job:
name: ansible-role-zuul-fedora-27
parent: ansible-role-zuul
@ -23,6 +28,31 @@
parent: ansible-role-zuul
nodeset: ubuntu-xenial
# Testing for zuul_install_method: git
- job:
name: ansible-role-zuul-src
parent: ansible-role-zuul-base
required-projects:
- name: openstack-infra/zuul
vars:
zuul_git_update: false
zuul_install_method: git
- job:
name: ansible-role-zuul-src-fedora-27
parent: ansible-role-zuul-src
nodeset: fedora-27
- job:
name: ansible-role-zuul-src-ubuntu-bionic
parent: ansible-role-zuul-src
nodeset: ubuntu-bionic
- job:
name: ansible-role-zuul-src-ubuntu-xenial
parent: ansible-role-zuul-src
nodeset: ubuntu-xenial
- project:
templates:
- windmill-jobs-fedora-27
@ -33,9 +63,14 @@
- ansible-role-zuul-fedora-27
- ansible-role-zuul-ubuntu-bionic
- ansible-role-zuul-ubuntu-xenial
- ansible-role-zuul-src-fedora-27
- ansible-role-zuul-src-ubuntu-bionic
- ansible-role-zuul-src-ubuntu-xenial
- tox-linters
gate:
jobs:
- ansible-role-zuul-fedora-27
- ansible-role-zuul-ubuntu-xenial
- ansible-role-zuul-src-fedora-27
- ansible-role-zuul-src-ubuntu-xenial
- tox-linters

View File

@ -21,7 +21,6 @@
zuul_file_zuul_web_service_config_src: etc/systemd/system/override.conf.j2
zuul_user_name: zuul-test
zuul_user_group: zuul-test
zuul_git_update: false
zuul_pip_executable: pip3
roles:
@ -91,12 +90,14 @@
stat:
path: /home/zuul/src/git.openstack.org/openstack-infra/zuul
register: zuul_git_dest_stat
when: zuul_install_method == 'git'
- name: Assert zuul_git_dest tests.
assert:
that:
- zuul_git_dest_stat.stat.exists
- zuul_git_dest_stat.stat.isdir
when: zuul_install_method == 'git'
- name: Register /etc/zuul/config/
stat: