CI: Allow restart of the container if it fails on the first attempt

In CI we sometimes encouter fail of the gNB/UE deployment (and fail of
the pipeline) caused by unsuccsessful initialization of the USRP N310.
Restart the container if the health check fails during initialization.

Introduce a configurable parameter (from XML) to set max number of
attempts for the container deployment.

Store logs from failed deployment attempts.
This commit is contained in:
Jaroslava Fiedlerova
2024-12-05 14:13:22 +01:00
parent f078e6f9c7
commit f786d92bc9
7 changed files with 41 additions and 28 deletions
+1
View File
@@ -349,6 +349,7 @@ def ExecuteActionWithParam(action):
string_field = test.findtext('services')
if string_field is not None:
CONTAINERS.services[CONTAINERS.eNB_instance] = string_field
CONTAINERS.num_attempts = int(test.findtext('num_attempts') or 1)
CONTAINERS.deploymentTag = cls_containerize.CreateTag(CONTAINERS.ranCommitID, CONTAINERS.ranBranch, CONTAINERS.ranAllowMerge)
if action == 'Deploy_Object':
success = CONTAINERS.DeployObject(HTML)