Reduce git clone noise when zuul cloner is used
When zuul cloner is used, the git clone task skips all the openstack repositories and generates a lot of log noise. This patch filters the list prior to giving it to the task so that the noise is reduced. Change-Id: Ia51b6c0899611fe92c8232a252b07c985aef923d
This commit is contained in:
parent
a6c205c986
commit
a4d33d74aa
@ -39,6 +39,19 @@
|
|||||||
- item.scm == "git" or item.scm is undefined
|
- item.scm == "git" or item.scm is undefined
|
||||||
with_items: "{{ roles }}"
|
with_items: "{{ roles }}"
|
||||||
|
|
||||||
|
- name: Prepare non-openstack git clone list
|
||||||
|
set_fact:
|
||||||
|
filtered_roles: >
|
||||||
|
{%- set filtered_role_list = [] %}
|
||||||
|
{%- for role in roles %}
|
||||||
|
{%- if not role.src | match(".*git.openstack.org.*") %}
|
||||||
|
{%- set _ = filtered_role_list.append(role) %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- filtered_role_list -}}
|
||||||
|
when:
|
||||||
|
- _zuul_cloner_check.rc == 0
|
||||||
|
|
||||||
- name: Clone git repos (with git)
|
- name: Clone git repos (with git)
|
||||||
git:
|
git:
|
||||||
repo: "{{ item.src }}"
|
repo: "{{ item.src }}"
|
||||||
@ -47,9 +60,8 @@
|
|||||||
update: true
|
update: true
|
||||||
force: true
|
force: true
|
||||||
when:
|
when:
|
||||||
- (_zuul_cloner_check.rc != 0) or (not item.src | match(".*git.openstack.org.*"))
|
|
||||||
- item.scm == "git" or item.scm is undefined
|
- item.scm == "git" or item.scm is undefined
|
||||||
with_items: "{{ roles }}"
|
with_items: "{{ filtered_roles | default(roles) }}"
|
||||||
|
|
||||||
- name: Create clone map
|
- name: Create clone map
|
||||||
copy:
|
copy:
|
||||||
|
Loading…
Reference in New Issue
Block a user