Remove unnecessary HTML printing, simplify code

This commit is contained in:
Robert Schmidt
2025-08-14 14:55:04 +02:00
parent 81a79980dd
commit 2f43b09651
3 changed files with 11 additions and 86 deletions
+5 -9
View File
@@ -414,20 +414,16 @@ class Cluster:
# Analyze the logs
collectInfo = {}
for image, lf in log_files:
files = {}
idx = 'Target Image Creation'
files[idx] = cls_containerize.AnalyzeBuildLogs(image, lf)
status = status and files[idx]['status']
collectInfo[image] = files
ret = cls_containerize.AnalyzeBuildLogs(image, lf)
imgStatus = ret['status']
msg = f"size {imageSize[image]}, analysis of {os.path.basename(lf)}: {ret['errors']} errors, {ret['warnings']} warnings"
HTML.CreateHtmlTestRowQueue(image, 'OK' if imgStatus else 'KO', [msg])
status = status and imgStatus
if status:
logging.info('\u001B[1m Building OAI Image(s) Pass\u001B[0m')
HTML.CreateHtmlTestRow('all', 'OK', CONST.ALL_PROCESSES_OK)
else:
logging.error('\u001B[1m Building OAI Images Failed\u001B[0m')
HTML.CreateHtmlTestRow('all', 'KO', CONST.ALL_PROCESSES_OK)
HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, imageSize)
# TODO fix groovy script, remove the following.
# the groovy scripts expects all logs in