Handle the pungi failures to ensure creation of log files
If the given directory is not a valid git directory, it raises RuntimeError. This can be catched and raised as GitUrlResolveError, so compose can continue to log the failure. Jira: RHELCMP-6077 Signed-off-by: Ozan Unsal <ounsal@redhat.com>
This commit is contained in:
parent
66dacb21e0
commit
980c7ba8fb
2 changed files with 14 additions and 3 deletions
|
|
@ -272,7 +272,7 @@ def main():
|
|||
logger, opts.skip_phase + conf.get("skip_phases", []), opts.just_phase
|
||||
):
|
||||
sys.exit(1)
|
||||
errors, warnings = pungi.checks.validate(conf)
|
||||
errors, warnings = pungi.checks.validate(conf, offline=True)
|
||||
|
||||
if not opts.quiet:
|
||||
# TODO: workaround for config files containing skip_phase = productimg
|
||||
|
|
@ -328,6 +328,13 @@ def main():
|
|||
logger=logger,
|
||||
notifier=notifier,
|
||||
)
|
||||
errors, warnings = pungi.checks.validate(conf, offline=False)
|
||||
if errors:
|
||||
for error in errors:
|
||||
logger.error("Config validation failed with the error: %s" % error)
|
||||
fail_to_start("Config validation failed", errors=errors)
|
||||
sys.exit(1)
|
||||
|
||||
notifier.compose = compose
|
||||
COMPOSE = compose
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue