vendor: update buildkit

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2021-09-21 07:49:39 +02:00
parent 06541ebd0f
commit 45e4550c36
1040 changed files with 100774 additions and 7915 deletions

View File

@ -12,7 +12,7 @@ import (
"github.com/moby/buildkit/solver/pb"
"github.com/moby/buildkit/util/apicaps"
digest "github.com/opencontainers/go-digest"
specs "github.com/opencontainers/image-spec/specs-go/v1"
ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
)
type StateOption func(State) State
@ -48,7 +48,7 @@ type State struct {
func (s State) ensurePlatform() State {
if o, ok := s.out.(interface {
Platform() *specs.Platform
Platform() *ocispecs.Platform
}); ok {
if p := o.Platform(); p != nil {
s = platform(*p)(s)
@ -351,11 +351,11 @@ func (s State) GetHostname(ctx context.Context, co ...ConstraintsOpt) (string, e
return getHostname(s)(ctx, c)
}
func (s State) Platform(p specs.Platform) State {
func (s State) Platform(p ocispecs.Platform) State {
return platform(p)(s)
}
func (s State) GetPlatform(ctx context.Context, co ...ConstraintsOpt) (*specs.Platform, error) {
func (s State) GetPlatform(ctx context.Context, co ...ConstraintsOpt) (*ocispecs.Platform, error) {
c := &Constraints{}
for _, f := range co {
f.SetConstraintsOption(c)
@ -403,7 +403,7 @@ type output struct {
vertex Vertex
getIndex func() (pb.OutputIndex, error)
err error
platform *specs.Platform
platform *ocispecs.Platform
}
func (o *output) ToInput(ctx context.Context, c *Constraints) (*pb.Input, error) {
@ -429,7 +429,7 @@ func (o *output) Vertex(context.Context, *Constraints) Vertex {
return o.vertex
}
func (o *output) Platform() *specs.Platform {
func (o *output) Platform() *ocispecs.Platform {
return o.platform
}
@ -560,7 +560,7 @@ func (cw *constraintsWrapper) applyConstraints(f func(c *Constraints)) {
}
type Constraints struct {
Platform *specs.Platform
Platform *ocispecs.Platform
WorkerConstraints []string
Metadata pb.OpMetadata
LocalUniqueID string
@ -568,7 +568,7 @@ type Constraints struct {
SourceLocations []*SourceLocation
}
func Platform(p specs.Platform) ConstraintsOpt {
func Platform(p ocispecs.Platform) ConstraintsOpt {
return constraintsOptFunc(func(c *Constraints) {
c.Platform = &p
})
@ -581,15 +581,15 @@ func LocalUniqueID(v string) ConstraintsOpt {
}
var (
LinuxAmd64 = Platform(specs.Platform{OS: "linux", Architecture: "amd64"})
LinuxArmhf = Platform(specs.Platform{OS: "linux", Architecture: "arm", Variant: "v7"})
LinuxAmd64 = Platform(ocispecs.Platform{OS: "linux", Architecture: "amd64"})
LinuxArmhf = Platform(ocispecs.Platform{OS: "linux", Architecture: "arm", Variant: "v7"})
LinuxArm = LinuxArmhf
LinuxArmel = Platform(specs.Platform{OS: "linux", Architecture: "arm", Variant: "v6"})
LinuxArm64 = Platform(specs.Platform{OS: "linux", Architecture: "arm64"})
LinuxS390x = Platform(specs.Platform{OS: "linux", Architecture: "s390x"})
LinuxPpc64le = Platform(specs.Platform{OS: "linux", Architecture: "ppc64le"})
Darwin = Platform(specs.Platform{OS: "darwin", Architecture: "amd64"})
Windows = Platform(specs.Platform{OS: "windows", Architecture: "amd64"})
LinuxArmel = Platform(ocispecs.Platform{OS: "linux", Architecture: "arm", Variant: "v6"})
LinuxArm64 = Platform(ocispecs.Platform{OS: "linux", Architecture: "arm64"})
LinuxS390x = Platform(ocispecs.Platform{OS: "linux", Architecture: "s390x"})
LinuxPpc64le = Platform(ocispecs.Platform{OS: "linux", Architecture: "ppc64le"})
Darwin = Platform(ocispecs.Platform{OS: "darwin", Architecture: "amd64"})
Windows = Platform(ocispecs.Platform{OS: "windows", Architecture: "amd64"})
)
func Require(filters ...string) ConstraintsOpt {