diff --git a/.zuul.d/jobs.yaml b/.zuul.d/jobs.yaml index 20a7a85..5594bc3 100644 --- a/.zuul.d/jobs.yaml +++ b/.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 diff --git a/playbooks/prove.yaml b/playbooks/prove.yaml index 05fc95a..8ccd10e 100644 --- a/playbooks/prove.yaml +++ b/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 diff --git a/playbooks/roles/test.zuul-registry/tasks/main.yaml b/playbooks/roles/test.zuul-registry/tasks/main.yaml new file mode 100644 index 0000000..df79147 --- /dev/null +++ b/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 diff --git a/playbooks/site.yaml b/playbooks/site.yaml index 3fcba7e..284efd4 100644 --- a/playbooks/site.yaml +++ b/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 diff --git a/playbooks/zuul-registry.yaml b/playbooks/zuul-registry.yaml new file mode 100644 index 0000000..c7796ca --- /dev/null +++ b/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 diff --git a/tests/collect-logs.yaml b/tests/collect-logs.yaml index 74979a3..93d7ad3 100644 --- a/tests/collect-logs.yaml +++ b/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 diff --git a/tests/extra-vars/git.yaml b/tests/extra-vars/git.yaml index ecafacc..7eb5e51 100644 --- a/tests/extra-vars/git.yaml +++ b/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 diff --git a/tools/requirements.yaml b/tools/requirements.yaml index acf1836..5e80554 100644 --- a/tools/requirements.yaml +++ b/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