From a0bbcbbcba4e6f39e3aff9a110b1287a777dada5 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Fri, 26 Jul 2019 17:20:55 -0400 Subject: [PATCH] ci: Fail when roles arent cloned by zuul This patch will make sure that all roles are cloned by Zuul and if there's any requirement installed that's from opendev which we have to clone, break out to ensure that we rely on Zuul to check-out roles. Change-Id: I2a58ba10d453380a406ef0cb425ad6618a12a1c0 --- scripts/get-ansible-role-requirements.yml | 15 +++++++ zuul.d/jobs.yaml | 52 +++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/scripts/get-ansible-role-requirements.yml b/scripts/get-ansible-role-requirements.yml index 7be7bb03b2..1de67b9260 100644 --- a/scripts/get-ansible-role-requirements.yml +++ b/scripts/get-ansible-role-requirements.yml @@ -57,6 +57,21 @@ with_items: "{{ zuul_roles.results | selectattr('stat.exists') | list }}" + # NOTE(mnaser): We need to make sure that all the roles + # are checked out by Zuul so we hard fail + # if any roles are not. + - name: Fail if any roles were not cloned + fail: + msg: | + The following roles were not cloned automatically by Zuul, + make sure that they're included in required-projects {{ uncloned_roles|join(',') }} + when: uncloned_roles | length > 0 + vars: + uncloned_roles: "{{ zuul_roles.results | rejectattr('stat.exists') + | map(attribute='item') + | map(attribute='src') + | select('match', 'opendev.org') + | list }}" when: - "lookup('env', 'ZUUL_SRC_PATH') != ''" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 0a1aa0e5bc..102aeabb81 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -22,6 +22,58 @@ aio deploy. required-projects: - name: openstack/openstack-ansible + - name: openstack/ansible-hardening + - name: openstack/openstack-ansible-apt_package_pinning + - name: openstack/ansible-config_template + - name: openstack/openstack-ansible-galera_client + - name: openstack/openstack-ansible-galera_server + - name: openstack/openstack-ansible-ceph_client + - name: openstack/openstack-ansible-haproxy_server + - name: openstack/openstack-ansible-lxc_container_create + - name: openstack/openstack-ansible-lxc_hosts + - name: openstack/openstack-ansible-memcached_server + - name: openstack/openstack-ansible-openstack_hosts + - name: openstack/openstack-ansible-os_keystone + - name: openstack/openstack-ansible-openstack_openrc + - name: openstack/openstack-ansible-os_aodh + - name: openstack/openstack-ansible-os_barbican + - name: openstack/openstack-ansible-os_blazar + - name: openstack/openstack-ansible-os_ceilometer + - name: openstack/openstack-ansible-os_cinder + - name: openstack/openstack-ansible-os_congress + - name: openstack/openstack-ansible-os_designate + - name: openstack/openstack-ansible-os_glance + - name: openstack/openstack-ansible-os_gnocchi + - name: openstack/openstack-ansible-os_heat + - name: openstack/openstack-ansible-os_horizon + - name: openstack/openstack-ansible-os_ironic + - name: openstack/openstack-ansible-os_magnum + - name: openstack/openstack-ansible-os_manila + - name: openstack/openstack-ansible-os_masakari + - name: openstack/openstack-ansible-os_mistral + - name: openstack/openstack-ansible-os_neutron + - name: openstack/openstack-ansible-os_nova + - name: openstack/openstack-ansible-os_octavia + - name: openstack/openstack-ansible-os_panko + - name: openstack/openstack-ansible-os_placement + - name: openstack/openstack-ansible-os_rally + - name: openstack/openstack-ansible-os_sahara + - name: openstack/openstack-ansible-os_swift + - name: openstack/openstack-ansible-os_tacker + - name: openstack/openstack-ansible-os_tempest + - name: openstack/openstack-ansible-os_trove + - name: openstack/openstack-ansible-plugins + - name: openstack/ansible-role-qdrouterd + - name: openstack/openstack-ansible-rabbitmq_server + - name: openstack/openstack-ansible-repo_server + - name: openstack/openstack-ansible-rsyslog_client + - name: openstack/openstack-ansible-rsyslog_server + - name: openstack/openstack-ansible-nspawn_container_create + - name: openstack/openstack-ansible-nspawn_hosts + - name: openstack/ansible-role-systemd_service + - name: openstack/ansible-role-systemd_mount + - name: openstack/ansible-role-systemd_networkd + - name: openstack/ansible-role-python_venv_build pre-run: - zuul.d/playbooks/pre-gate-scenario.yml - zuul.d/playbooks/pre-osa-aio.yml