Browse Source

Add zuul-registry support

Depends-On: https://review.opendev.org/763101
Change-Id: I67c08418df38d31a01c2ecf114aa52daf8af185c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
changes/15/763115/8
Paul Belanger 2 years ago
parent
commit
d38f969429
  1. 3
      .zuul.d/jobs.yaml
  2. 8
      playbooks/prove.yaml
  3. 31
      playbooks/roles/test.zuul-registry/tasks/main.yaml
  4. 1
      playbooks/site.yaml
  5. 21
      playbooks/zuul-registry.yaml
  6. 22
      tests/collect-logs.yaml
  7. 3
      tests/extra-vars/git.yaml
  8. 3
      tools/requirements.yaml

3
.zuul.d/jobs.yaml

@ -23,6 +23,7 @@
- windmill/ansible-role-virtualenv
- windmill/ansible-role-zookeeper
- windmill/ansible-role-zuul
- windmill/ansible-role-zuul-registry
- openstack/diskimage-builder
- openstack/openstacksdk
- windmill/windmill
@ -31,6 +32,7 @@
- opendev/gear
- zuul/nodepool
- zuul/zuul
- zuul/zuul-registry
timeout: 3600
# Testing for install_method: pip
@ -66,6 +68,7 @@
- zuul/nodepool
- openstack/openstacksdk
- zuul/zuul
- zuul/zuul-registry
vars:
windmill_extra_vars_file: tests/extra-vars/git.yaml

8
playbooks/prove.yaml

@ -84,6 +84,14 @@
include_role:
name: test.zuul-merger
- name: Validate zuul-registry
hosts: zuul-registry:!disabled
tasks:
- name: Run zuul-registry validation
include_role:
name: test.zuul-registry
- name: Validate zuul-web
hosts: zuul-web:!disabled

31
playbooks/roles/test.zuul-registry/tasks/main.yaml

@ -0,0 +1,31 @@
# Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
---
- name: "Register {{ zuul_registry_pip_virtualenv }}"
stat:
path: "{{ zuul_registry_pip_virtualenv }}"
register: test_zuul_registry_pip_virtualenv_stat
- name: "Assert {{ zuul_registry_pip_virtualenv }} tests"
assert:
that:
- test_zuul_registry_pip_virtualenv_stat.stat.exists
- test_zuul_registry_pip_virtualenv_stat.stat.isdir
- name: Ensure zuul-registry is running
become: true
shell: /usr/sbin/service zuul-registry status
changed_when: false
tags:
- skip_ansible_lint

1
playbooks/site.yaml

@ -16,4 +16,5 @@
- import_playbook: gear.yaml
- import_playbook: zookeeper.yaml
- import_playbook: nodepool.yaml
- import_playbook: zuul-registry.yaml
- import_playbook: zuul.yaml

21
playbooks/zuul-registry.yaml

@ -0,0 +1,21 @@
# Copyright 2018 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Bootstrap zuul-registry hosts
hosts: zuul-registry:!disabled
tasks:
- name: Setup windmill.zuul-registry role
include_role:
name: windmill.zuul-registry

22
tests/collect-logs.yaml

@ -204,6 +204,28 @@
- /var/log/zuul/merger-debug.log
- /var/log/zuul/merger.log
- hosts: zr01
tasks:
- name: Collect journald logs
shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
args:
creates: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}/var/log/journal/{{ item }}.service.log"
with_items:
- zuul-registry
- name: Collect zuul-registry log files
become: true
synchronize:
dest: "{{ zuul_output_dir }}/logs/logs/{{ inventory_hostname }}"
rsync_opts:
- "--relative"
- "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
src: "{{ item }}"
verify_host: true
delegate_to: "{{ inventory_hostname }}"
with_items:
- /etc/zuul-registry
- hosts: zw01
tasks:
- name: Collect journald logs

3
tests/extra-vars/git.yaml

@ -17,6 +17,9 @@ openstacksdk_install_method: git
zuul_git_update: false
zuul_install_method: git
zuul_registry_git_update: false
zuul_registry_install_method: git
# NOTE(pabelanger): In the gate, we want to create a zuul-test user /
# group as zuul already exists on our images.
zuul_user_name: zuul-test

3
tools/requirements.yaml

@ -35,5 +35,8 @@
- name: windmill.zuul
src: git+https://opendev.org/windmill/ansible-role-zuul
- name: windmill.zuul-registry
src: git+https://opendev.org/windmill/ansible-role-zuul-registry
- name: windmill.ansible
src: git+https://opendev.org/windmill/ansible-role-ansible

Loading…
Cancel
Save