Add zuulv3 jobs support

Now that zuulv3 is live, we can switch to native ansible jobs.

Change-Id: Idb7b57149def695c73f3d22e6500507e66e9189d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-11-13 20:24:38 -05:00
parent 63c794fddb
commit 1842d7bed4
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
7 changed files with 49 additions and 15 deletions

40
.zuul.yaml Normal file
View File

@ -0,0 +1,40 @@
- job:
name: ansible-role-diskimage-builder
run: tests/test.yaml
required-projects:
- name: openstack/diskimage-builder
roles:
- zuul: openstack/ansible-role-diskimage-builder
- job:
name: ansible-role-diskimage-builder-centos-7
parent: ansible-role-diskimage-builder
nodeset: centos-7
- job:
name: ansible-role-diskimage-builder-fedora-26
parent: ansible-role-diskimage-builder
nodeset: fedora-26
- job:
name: ansible-role-diskimage-builder-ubuntu-xenial
parent: ansible-role-diskimage-builder
nodeset: ubuntu-xenial
- project:
name: openstack/ansible-role-diskimage-builder
templates:
- windmill-jobs-fedora-26
- windmill-jobs-xenial
check:
jobs:
- ansible-role-diskimage-builder-centos-7
- ansible-role-diskimage-builder-fedora-26
- ansible-role-diskimage-builder-ubuntu-xenial
- tox-linters
gate:
jobs:
- ansible-role-diskimage-builder-centos-7
- ansible-role-diskimage-builder-fedora-26
- ansible-role-diskimage-builder-ubuntu-xenial
- tox-linters

View File

@ -20,6 +20,7 @@ diskimage_builder_task_manager:
diskimage_builder_git_dest: /opt/ansible-role-diskimage-builder/git/openstack/diskimage-builder
diskimage_builder_git_uri: https://git.openstack.org/openstack/diskimage-builder
# diskimage_builder_git_refspec:
# diskimage_builder_git_update:
# diskimage_builder_git_version:
diskimage_builder_install_method: git

View File

@ -18,6 +18,7 @@
dest: "{{ diskimage_builder_git_dest }}"
refspec: "{{ diskimage_builder_git_refspec|default(omit) }}"
repo: "{{ diskimage_builder_git_uri }}"
update: "{{ diskimage_builder_git_update|default(omit) }}"
version: "{{ diskimage_builder_git_version|default(omit) }}"
- name: Set diskimage_builder_pip_name to local git repo.

View File

@ -1,2 +0,0 @@
[defaults]
roles_path = ../..

View File

@ -1,2 +1 @@
[all]
localhost ansible_connection=ssh
localhost

View File

@ -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'
diskimage_builder_git_dest: "{{ ansible_user_dir }}/src/git.openstack.org/openstack/diskimage-builder"
diskimage_builder_git_update: false
rolename: ansible-role-diskimage-builder
roles:
- "{{ rolename }}"
@ -29,7 +24,7 @@
post_tasks:
- name: Register diskimage_builder_git_dest_stat.
stat:
path: /opt/ansible-role-diskimage-builder/git/openstack/diskimage-builder
path: /home/zuul/src/git.openstack.org/openstack/diskimage-builder
register: diskimage_builder_git_dest_stat
- name: Assert diskimage_builder_git_dest tests.

View File

@ -31,7 +31,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