Do not fail on empty YAML file

Change-Id: Ia12862f902c2f0b638fcbff798553ca404d81e24
This commit is contained in:
Vsevolod Fedorov 2023-04-12 11:21:31 +03:00
parent 60e8395c62
commit eebfb9c961
2 changed files with 4 additions and 0 deletions

View File

@ -119,6 +119,8 @@ def load_files(config, roots, path_list):
data = loader.load_fp(path)
else:
data = loader.load_path(path)
if data is None:
continue
if not isinstance(data, list):
raise JenkinsJobsException(
f"The topmost collection must be a list, but is: {data}",

View File

@ -0,0 +1,2 @@
# Nothing is here.
# Just check that jenkins-jobs do not fail on YAML file with no contents.