Merge "Fix fetch_wheels to work with hierahical registries"

This commit is contained in:
Zuul 2019-06-07 01:10:29 +00:00 committed by Gerrit Code Review
commit 531bad90cd
1 changed files with 5 additions and 2 deletions

View File

@ -94,8 +94,11 @@ def parse_image(full_image):
slash_occurrences = len(re.findall('/',full_image))
repo = None
registry = DOCKER_REGISTRY
if slash_occurrences == 2:
registry, repo, image = full_image.split('/')
if slash_occurrences > 1:
full_image_list = full_image.split('/')
registry = full_image_list[0]
repo = '/'.join(full_image_list[1:-1])
image = full_image_list[-1]
elif slash_occurrences == 1:
repo, image = full_image.split('/')
else: