Add --all-tags/-a flag to image push#1335
Open
realrajaryan wants to merge 3 commits intoapple:mainfrom
Open
Conversation
Comment on lines
+297
to
+302
| let repositoryName: String | ||
| if let resolved = parsedRef.resolvedDomain { | ||
| repositoryName = "\(resolved)/\(parsedRef.path)" | ||
| } else { | ||
| repositoryName = parsedRef.name | ||
| } |
Contributor
There was a problem hiding this comment.
Suggestion: Looks like this is being repeated at couple of places. I think moving this to a package level function inside Utility would make sense.
Sources/Services/ContainerImagesService/Server/ImagesService.swift
Outdated
Show resolved
Hide resolved
Comment on lines
+163
to
+172
| guard !Utility.isInfraImage(name: image.reference) else { return false } | ||
| guard let ref = try? Reference.parse(image.reference) else { return false } | ||
| let resolvedName: String | ||
| if let resolved = ref.resolvedDomain { | ||
| resolvedName = "\(resolved)/\(ref.path)" | ||
| } else { | ||
| resolvedName = ref.name | ||
| } | ||
| return resolvedName == repositoryName | ||
| } |
Contributor
There was a problem hiding this comment.
Suggestion: This would be a good candidate which can be moved to Utility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
-a/--all-tagsforcontainer image push#1334.Type of Change
Motivation and Context
Adds
--all-tags(-a) support tocontainer image push, which pushes all locally tagged versions of a repository in parallel with bounded concurrency (--max-concurrent-uploads, default 3). It continues pushing remaining tags if one fails.Usage:
container image push --all-tags myregistry.io/myimageExample:
Note:
-aonpushnow means--all-tags, not--arch.--archremains available as a long-form flag.Testing