mirror of
https://github.com/containers/podman.git
synced 2025-07-05 02:39:23 +08:00
Update vendor of buildah and containers/common
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
go.modgo.sum
vendor
github.com
blang/semver
containers
docker/spdystream
fsouza/go-dockerclient
uber/jaeger-lib/metrics
xeipuuv/gojsonschema
golang.org/x
crypto
blowfish
openpgp/armor
poly1305
ssh
oauth2
time/rate
google.golang.org/genproto/googleapis/rpc/status
modules.txt
16
vendor/github.com/containers/buildah/commit.go
generated
vendored
16
vendor/github.com/containers/buildah/commit.go
generated
vendored
@ -12,7 +12,6 @@ import (
|
||||
|
||||
"github.com/containers/buildah/pkg/blobcache"
|
||||
"github.com/containers/buildah/util"
|
||||
cp "github.com/containers/image/v5/copy"
|
||||
"github.com/containers/image/v5/docker"
|
||||
"github.com/containers/image/v5/docker/reference"
|
||||
"github.com/containers/image/v5/manifest"
|
||||
@ -83,6 +82,12 @@ type CommitOptions struct {
|
||||
OmitTimestamp bool
|
||||
// SignBy is the fingerprint of a GPG key to use for signing the image.
|
||||
SignBy string
|
||||
// MaxRetries is the maximum number of attempts we'll make to commit
|
||||
// the image to an external registry if the first attempt fails.
|
||||
MaxRetries int
|
||||
// RetryDelay is how long to wait before retrying a commit attempt to a
|
||||
// registry.
|
||||
RetryDelay time.Duration
|
||||
}
|
||||
|
||||
// PushOptions can be used to alter how an image is copied somewhere.
|
||||
@ -122,6 +127,11 @@ type PushOptions struct {
|
||||
// RemoveSignatures causes any existing signatures for the image to be
|
||||
// discarded for the pushed copy.
|
||||
RemoveSignatures bool
|
||||
// MaxRetries is the maximum number of attempts we'll make to push any
|
||||
// one image to the external registry if the first attempt fails.
|
||||
MaxRetries int
|
||||
// RetryDelay is how long to wait before retrying a push attempt.
|
||||
RetryDelay time.Duration
|
||||
}
|
||||
|
||||
var (
|
||||
@ -309,7 +319,7 @@ func (b *Builder) Commit(ctx context.Context, dest types.ImageReference, options
|
||||
}
|
||||
|
||||
var manifestBytes []byte
|
||||
if manifestBytes, err = cp.Image(ctx, policyContext, maybeCachedDest, maybeCachedSrc, getCopyOptions(b.store, options.ReportWriter, nil, systemContext, "", false, options.SignBy)); err != nil {
|
||||
if manifestBytes, err = retryCopyImage(ctx, policyContext, maybeCachedDest, maybeCachedSrc, dest, "push", getCopyOptions(b.store, options.ReportWriter, nil, systemContext, "", false, options.SignBy), options.MaxRetries, options.RetryDelay); err != nil {
|
||||
return imgID, nil, "", errors.Wrapf(err, "error copying layers and metadata for container %q", b.ContainerID)
|
||||
}
|
||||
// If we've got more names to attach, and we know how to do that for
|
||||
@ -441,7 +451,7 @@ func Push(ctx context.Context, image string, dest types.ImageReference, options
|
||||
systemContext.DirForceCompress = true
|
||||
}
|
||||
var manifestBytes []byte
|
||||
if manifestBytes, err = cp.Image(ctx, policyContext, dest, maybeCachedSrc, getCopyOptions(options.Store, options.ReportWriter, nil, systemContext, options.ManifestType, options.RemoveSignatures, options.SignBy)); err != nil {
|
||||
if manifestBytes, err = retryCopyImage(ctx, policyContext, dest, maybeCachedSrc, dest, "push", getCopyOptions(options.Store, options.ReportWriter, nil, systemContext, options.ManifestType, options.RemoveSignatures, options.SignBy), options.MaxRetries, options.RetryDelay); err != nil {
|
||||
return nil, "", errors.Wrapf(err, "error copying layers and metadata from %q to %q", transports.ImageName(maybeCachedSrc), transports.ImageName(dest))
|
||||
}
|
||||
if options.ReportWriter != nil {
|
||||
|
Reference in New Issue
Block a user