Fix sorting
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 34s
Deploy Test / Run deploy test suite (pull_request) Successful in 4m36s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 8m28s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m1s
Smoke Test / Run basic test suite (pull_request) Successful in 4m26s
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 34s
Deploy Test / Run deploy test suite (pull_request) Successful in 4m36s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 8m28s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m1s
Smoke Test / Run basic test suite (pull_request) Successful in 4m26s
This commit is contained in:
parent
4b67617c81
commit
8fa6dd3020
@ -73,7 +73,9 @@ def _get_tags_for_container(container: str, registry_info: RegistryInfo) -> List
|
||||
|
||||
def _find_latest(candidate_tags: List[str]):
|
||||
# Lex sort should give us the latest first
|
||||
sorted_candidates = candidate_tags.sort()
|
||||
sorted_candidates = sorted(candidate_tags)
|
||||
if opts.o.debug:
|
||||
print(f"sorted candidates: {sorted_candidates}")
|
||||
return sorted_candidates[0]
|
||||
|
||||
|
||||
@ -126,11 +128,6 @@ def _exists_locally(container: str):
|
||||
return docker.image.exists(_local_tag_for(container))
|
||||
|
||||
|
||||
def _remove_local_tag(container: str):
|
||||
# TODO Do we need this?
|
||||
pass
|
||||
|
||||
|
||||
def _add_local_tag(remote_tag: str, registry: str, local_tag: str):
|
||||
docker = DockerClient()
|
||||
docker.image.tag(f"{registry}/{remote_tag}", local_tag)
|
||||
@ -170,9 +167,8 @@ def command(ctx, include, exclude, force_local_overwrite, image_registry, regist
|
||||
if (force_local_overwrite):
|
||||
# In that case remove the existing :local tag
|
||||
if not opts.o.quiet:
|
||||
print(f"Warning: removing local tag from this image: {container} because "
|
||||
print(f"Warning: overwriting local tag from this image: {container} because "
|
||||
"--force-local-overwrite was specified")
|
||||
_remove_local_tag(local_tag)
|
||||
else:
|
||||
if not opts.o.quiet:
|
||||
print(f"Skipping local tagging for this image: {container} because that would "
|
||||
|
Loading…
Reference in New Issue
Block a user