Commit 97732337 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

CI: Ignore errors present in build logs

Report errors found in the build logs, but do not fail the job if some are
present. Based on observations, certain errors (for example):

update-alternatives: error: alternative path /usr/share/man/man7/bash-builtins.7.gz doesn't exist

do not actually cause the build to fail. Instead of relying on log parsing, we should maybe
check the return code of the build process to determine whether the build truly failed?
parent 26d7b999
......@@ -93,7 +93,7 @@ def AnalyzeBuildLogs(image, lf):
committed = committed or lineHasCommit
if re.search(r'error:|Errors|ERROR', line):
errors.append(f"=> {line.strip()}")
status = (committed or tagged) and len(errors) == 0
status = (committed or tagged)
logging.info(f"Analyzing {image}, file {lf}: {status=}, {len(errors)} errors")
for e in errors:
logging.info(e)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment