CI: harmonize pull/clean with flexric hack

If we are pulling FlexRIC, overwrite the tag to use with what has been
provided on the command line. This is because we hardcode the tag schema
"branchname-commitId[0:8]" everywhere else, but this does not apply for
FlexRIC, and we have to overwrite this here.
This commit is contained in:
Robert Schmidt
2024-11-25 15:33:41 +01:00
parent 010a23863c
commit 7bf706bc9a
+9 -7
View File
@@ -373,15 +373,17 @@ def ExecuteActionWithParam(action):
svr_id = test.findtext('svr_id')
success = CONTAINERS.Push_Image_to_Local_Registry(HTML, svr_id)
elif action == 'Pull_Local_Registry':
elif action == 'Pull_Local_Registry' or action == 'Clean_Test_Server_Images':
svr_id = test.findtext('svr_id')
images = test.findtext('images').split()
success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images)
elif action == 'Clean_Test_Server_Images':
svr_id = test.findtext('svr_id')
images = test.findtext('images').split()
success = CONTAINERS.Clean_Test_Server_Images(HTML, svr_id, images)
# hack: for FlexRIC, we need to overwrite the tag to use
tag = None
if len(images) == 1 and images[0] == "oai-flexric":
tag = CONTAINERS.flexricTag
if action == "Pull_Local_Registry":
success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images, tag=tag)
if action == "Clean_Test_Server_Images":
success = CONTAINERS.Clean_Test_Server_Images(HTML, svr_id, images, tag=tag)
elif action == 'Custom_Command':
node = test.findtext('node')