mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to master@31c870e82a48
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
2
vendor/github.com/moby/buildkit/util/contentutil/copy.go
generated
vendored
2
vendor/github.com/moby/buildkit/util/contentutil/copy.go
generated
vendored
@ -15,6 +15,7 @@ import (
|
||||
)
|
||||
|
||||
func Copy(ctx context.Context, ingester content.Ingester, provider content.Provider, desc ocispecs.Descriptor, ref string, logger func([]byte)) error {
|
||||
ctx = RegisterContentPayloadTypes(ctx)
|
||||
if _, err := retryhandler.New(limited.FetchHandler(ingester, &localFetcher{provider}, ref), logger)(ctx, desc); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -60,6 +61,7 @@ func (r *rc) Seek(offset int64, whence int) (int64, error) {
|
||||
}
|
||||
|
||||
func CopyChain(ctx context.Context, ingester content.Ingester, provider content.Provider, desc ocispecs.Descriptor) error {
|
||||
ctx = RegisterContentPayloadTypes(ctx)
|
||||
var m sync.Mutex
|
||||
manifestStack := []ocispecs.Descriptor{}
|
||||
|
||||
|
15
vendor/github.com/moby/buildkit/util/contentutil/types.go
generated
vendored
Normal file
15
vendor/github.com/moby/buildkit/util/contentutil/types.go
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
package contentutil
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/containerd/containerd/remotes"
|
||||
intoto "github.com/in-toto/in-toto-golang/in_toto"
|
||||
)
|
||||
|
||||
// RegisterContentPayloadTypes registers content types that are not defined by
|
||||
// default but that we expect to find in registry images.
|
||||
func RegisterContentPayloadTypes(ctx context.Context) context.Context {
|
||||
ctx = remotes.WithMediaTypeKeyPrefix(ctx, intoto.PayloadType, "intoto")
|
||||
return ctx
|
||||
}
|
Reference in New Issue
Block a user