From 891392339fc75b2da37672c2c9a42a90f74a335b Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Sat, 28 Jul 2018 03:13:54 +0200 Subject: Split Image.PushImageToReference from Image.PushImage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This retains the existing string parsing heuristic for users who must continue to use it (notably the varlink API - or is it still subject to change?), but allows callers who can get precise references to supply them without having to deal with string formatting. Should not change behavior (but does not add unit tests). Signed-off-by: Miloslav Trmač Closes: #1176 Approved by: rhatdan --- libpod/image/image.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libpod/image/image.go') diff --git a/libpod/image/image.go b/libpod/image/image.go index 3abaecc6c..068e57477 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -533,7 +533,11 @@ func (i *Image) PushImage(ctx context.Context, destination, manifestMIMEType, au return err } } + return i.PushImageToReference(ctx, dest, manifestMIMEType, authFile, signaturePolicyPath, writer, forceCompress, signingOptions, dockerRegistryOptions, forceSecure, additionalDockerArchiveTags) +} +// PushImageToReference pushes the given image to a location described by the given path +func (i *Image) PushImageToReference(ctx context.Context, dest types.ImageReference, manifestMIMEType, authFile, signaturePolicyPath string, writer io.Writer, forceCompress bool, signingOptions SigningOptions, dockerRegistryOptions *DockerRegistryOptions, forceSecure bool, additionalDockerArchiveTags []reference.NamedTagged) error { sc := GetSystemContext(signaturePolicyPath, authFile, forceCompress) policyContext, err := getPolicyContext(sc) -- cgit v1.2.3-54-g00ecf