Fix #619: Support for module YAML file validation within a SCM repository

This commit is contained in:
Filip Valder
2017-08-07 12:50:23 +02:00
parent ddc57d08eb
commit 09b3f32dbb
6 changed files with 91 additions and 34 deletions

View File

@@ -494,9 +494,9 @@ def _fetch_mmd(url, branch=None, allow_local_url=False, whitelist_url=False):
scm = module_build_service.scm.SCM(url, branch, [url], allow_local_url)
else:
scm = module_build_service.scm.SCM(url, branch, conf.scmurls, allow_local_url)
cod = scm.checkout(td)
scm.verify(cod)
cofn = os.path.join(cod, (scm.name + ".yaml"))
scm.checkout(td)
scm.verify()
cofn = scm.get_module_yaml()
with open(cofn, "r") as mmdfile:
yaml = mmdfile.read()