diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 09f77e1f76..f07126c713 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -444,7 +444,7 @@ class Containerize(): logging.error('\u001B[1m Building OAI Images Failed\u001B[0m') HTML.CreateHtmlTestRow(self.imageKind, 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTabFooter(False) - sys.exit(1) + return False else: result = re.search('Size *= *(?P[0-9\-]+) *bytes', cmd.getBefore()) if result is not None: @@ -520,12 +520,13 @@ class Containerize(): logging.info('\u001B[1m Building OAI Image(s) Pass\u001B[0m') HTML.CreateHtmlTestRow(self.imageKind, 'OK', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, allImagesSize) + return True else: logging.error('\u001B[1m Building OAI Images Failed\u001B[0m') HTML.CreateHtmlTestRow(self.imageKind, 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlNextTabHeaderTestRow(collectInfo, allImagesSize) HTML.CreateHtmlTabFooter(False) - sys.exit(1) + return False def BuildProxy(self, HTML): if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '': @@ -608,7 +609,7 @@ class Containerize(): mySSH.close() HTML.CreateHtmlTestRow('commit ' + tag, 'KO', CONST.ALL_PROCESSES_OK) HTML.CreateHtmlTabFooter(False) - sys.exit(1) + return False else: logging.debug('L2sim proxy image for tag ' + tag + ' already exists, skipping build') diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 8770224393..a68ace691a 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -830,9 +830,13 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re if not CLUSTER.BuildClusterImage(HTML): RAN.prematureExit = True elif action == 'Build_Image': - CONTAINERS.BuildImage(HTML) + success = CONTAINERS.BuildImage(HTML) + if not success: + RAN.prematureExit = True elif action == 'Build_Proxy': - CONTAINERS.BuildProxy(HTML) + success = CONTAINERS.BuildProxy(HTML) + if not success: + RAN.prematureExit = True elif action == 'Push_Local_Registry': success = CONTAINERS.Push_Image_to_Local_Registry(HTML) if not success: