Commit 7bf706bc authored by Robert Schmidt's avatar Robert Schmidt

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.
parent 010a2386
......@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment