Do not fail on empty YAML file
Change-Id: Ia12862f902c2f0b638fcbff798553ca404d81e24
This commit is contained in:
parent
60e8395c62
commit
eebfb9c961
@ -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}",
|
||||
|
2
tests/yamlparser/job_fixtures/empty_template_file.yaml
Normal file
2
tests/yamlparser/job_fixtures/empty_template_file.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
# Nothing is here.
|
||||
# Just check that jenkins-jobs do not fail on YAML file with no contents.
|
Loading…
x
Reference in New Issue
Block a user