This commit is contained in:
Thomas E Lackey 2024-01-30 22:40:52 -06:00
parent a9b476c326
commit 3e7943b9fe

View File

@ -32,12 +32,7 @@ def _image_needs_pushed(image: str):
def remote_tag_for_image(image: str, remote_repo_url: str):
# Turns image tags of the form: foo/bar:local into remote.repo/org/bar:deploy
major_parts = image.split("/", 2)
org = None
if 2 == len(major_parts):
org = major_parts[0]
image_name_with_version = major_parts[1]
else:
image_name_with_version = major_parts[0]
image_name_with_version = major_parts[1] if 2 == len(major_parts) else major_parts[0]
(image_name, image_version) = image_name_with_version.split(":")
if image_version == "local":
return f"{remote_repo_url}/{image_name}:deploy"