vendor: update buildkit to 539be170

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2021-12-15 22:09:13 -08:00
parent 59533bbb5c
commit 9c3be32bc9
581 changed files with 24648 additions and 16682 deletions

View File

@ -29,6 +29,18 @@ type Vertex interface {
Inputs() []Output
}
func NewConstraints(co ...ConstraintsOpt) *Constraints {
defaultPlatform := platforms.Normalize(platforms.DefaultSpec())
c := &Constraints{
Platform: &defaultPlatform,
LocalUniqueID: identity.NewID(),
}
for _, o := range co {
o.SetConstraintsOption(c)
}
return c
}
func NewState(o Output) State {
s := State{
out: o,
@ -112,18 +124,12 @@ func (s State) SetMarshalDefaults(co ...ConstraintsOpt) State {
}
func (s State) Marshal(ctx context.Context, co ...ConstraintsOpt) (*Definition, error) {
c := NewConstraints(append(s.opts, co...)...)
def := &Definition{
Metadata: make(map[digest.Digest]pb.OpMetadata, 0),
Metadata: make(map[digest.Digest]pb.OpMetadata, 0),
Constraints: c,
}
defaultPlatform := platforms.Normalize(platforms.DefaultSpec())
c := &Constraints{
Platform: &defaultPlatform,
LocalUniqueID: identity.NewID(),
}
for _, o := range append(s.opts, co...) {
o.SetConstraintsOption(c)
}
if s.Output() == nil || s.Output().Vertex(ctx, c) == nil {
return def, nil
}
@ -401,6 +407,10 @@ func (s State) AddUlimit(name UlimitName, soft int64, hard int64) State {
return ulimit(name, soft, hard)(s)
}
func (s State) WithCgroupParent(cp string) State {
return cgroupParent(cp)(s)
}
func (s State) isFileOpCopyInput() {}
type output struct {