From f1e3f7fb1f0fc8acc69d096987c2f6324f362e50 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 7 Jul 2022 17:59:33 +0200 Subject: [PATCH] CI: Abort pipeline if DeployObject fails --- ci-scripts/cls_containerize.py | 2 ++ ci-scripts/main.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 259db7bffe..49aeeeed55 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -567,8 +567,10 @@ class Containerize(): if status: HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) else: + self.exitStatus = 1 HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK) + def UndeployObject(self, HTML, RAN): if self.eNB_serverId[self.eNB_instance] == '0': lIpAddr = self.eNBIPAddress diff --git a/ci-scripts/main.py b/ci-scripts/main.py index adef885942..448f2636e3 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -919,6 +919,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re CONTAINERS.Copy_Image_to_Test_Server(HTML) elif action == 'Deploy_Object': CONTAINERS.DeployObject(HTML, EPC) + if CONTAINERS.exitStatus==1: + RAN.prematureExit = True elif action == 'Undeploy_Object': CONTAINERS.UndeployObject(HTML, RAN) elif action == 'Cppcheck_Analysis':