From 955cad5741ae5d1acf211ee8ac6d258e2420ddce Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Thu, 30 Jan 2025 22:34:09 +0100 Subject: [PATCH] CI: add warning log to HTML when service is restarted --- ci-scripts/cls_containerize.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index dc461dfe7e..6562c15f28 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -889,7 +889,10 @@ class Containerize(): if deployed: break elif (attempt < num_attempts - 1): - logging.warning(f'Failed to deploy on attempt {attempt}, restart services {services}') + warning_msg = f'Restart services {services}' + logging.warning(warning_msg) + imagesInfo.append(warning_msg) + HTML.CreateHtmlTestRowQueue('N/A', 'NOK', ['\n'.join(imagesInfo)]) for svc in services.split(): CopyinServiceLog(ssh, lSourcePath, yaml_dir, svc, wd_yaml, f'{svc}-{HTML.testCase_id}-attempt{attempt}.log') ssh.run(f'docker compose -f {wd_yaml} down -- {services}')