Fix the zuul main.yaml config checks
It is possible to have two different types of dict listings for zuul tenant project lists. The first (which we handled fine) is a dict per project where we list which items we include from that project. The other is a dict with global settings and a list of projects. Handle this second case. Change-Id: I03969da4595f4c66db36cab35ef96a33c6766002
This commit is contained in:
parent
aedf049539
commit
4a94d0debf
@ -115,6 +115,11 @@ def check_zuul_main(zuul_main, projects):
|
|||||||
for project_types in sources['gerrit']:
|
for project_types in sources['gerrit']:
|
||||||
for entry in sources['gerrit'][project_types]:
|
for entry in sources['gerrit'][project_types]:
|
||||||
if isinstance(entry, dict):
|
if isinstance(entry, dict):
|
||||||
|
if 'projects' in entry:
|
||||||
|
for x in entry['projects']:
|
||||||
|
found_errors += check_project_exists(
|
||||||
|
x, project_names)
|
||||||
|
else:
|
||||||
for x in entry.keys():
|
for x in entry.keys():
|
||||||
found_errors += check_project_exists(
|
found_errors += check_project_exists(
|
||||||
x, project_names)
|
x, project_names)
|
||||||
|
Loading…
Reference in New Issue
Block a user