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
This commit is contained in:
Mohammed Naser 2019-07-26 17:20:55 -04:00
parent ff1f22ddf5
commit a0bbcbbcba
2 changed files with 67 additions and 0 deletions

View File

@ -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') != ''"

View File

@ -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