mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
vendor: update buildkit to master@ae9d0f5
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
24
vendor/github.com/moby/buildkit/client/build.go
generated
vendored
24
vendor/github.com/moby/buildkit/client/build.go
generated
vendored
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/moby/buildkit/client/buildid"
|
||||
"github.com/moby/buildkit/frontend/attestations"
|
||||
gateway "github.com/moby/buildkit/frontend/gateway/client"
|
||||
"github.com/moby/buildkit/frontend/gateway/grpcclient"
|
||||
gatewayapi "github.com/moby/buildkit/frontend/gateway/pb"
|
||||
@ -20,17 +21,15 @@ func (c *Client) Build(ctx context.Context, opt SolveOpt, product string, buildF
|
||||
}
|
||||
}()
|
||||
|
||||
if opt.Frontend != "" {
|
||||
return nil, errors.New("invalid SolveOpt, Build interface cannot use Frontend")
|
||||
}
|
||||
feOpts := opt.FrontendAttrs
|
||||
|
||||
opt.Frontend = ""
|
||||
opt.FrontendAttrs = attestations.Filter(opt.FrontendAttrs)
|
||||
|
||||
if product == "" {
|
||||
product = apicaps.ExportedProduct
|
||||
}
|
||||
|
||||
feOpts := opt.FrontendAttrs
|
||||
opt.FrontendAttrs = nil
|
||||
|
||||
workers, err := c.ListWorkers(ctx)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "listing workers for Build")
|
||||
@ -113,6 +112,19 @@ func (g *gatewayClientForBuild) StatFile(ctx context.Context, in *gatewayapi.Sta
|
||||
return g.gateway.StatFile(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (g *gatewayClientForBuild) Evaluate(ctx context.Context, in *gatewayapi.EvaluateRequest, opts ...grpc.CallOption) (*gatewayapi.EvaluateResponse, error) {
|
||||
if err := g.caps.Supports(gatewayapi.CapGatewayEvaluate); err != nil {
|
||||
if err2 := g.caps.Supports(gatewayapi.CapStatFile); err2 != nil {
|
||||
return nil, err
|
||||
}
|
||||
ctx = buildid.AppendToOutgoingContext(ctx, g.buildID)
|
||||
_, err := g.gateway.StatFile(ctx, &gatewayapi.StatFileRequest{Ref: in.Ref, Path: "."}, opts...)
|
||||
return &gatewayapi.EvaluateResponse{}, err
|
||||
}
|
||||
ctx = buildid.AppendToOutgoingContext(ctx, g.buildID)
|
||||
return g.gateway.Evaluate(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (g *gatewayClientForBuild) Ping(ctx context.Context, in *gatewayapi.PingRequest, opts ...grpc.CallOption) (*gatewayapi.PongResponse, error) {
|
||||
ctx = buildid.AppendToOutgoingContext(ctx, g.buildID)
|
||||
return g.gateway.Ping(ctx, in, opts...)
|
||||
|
Reference in New Issue
Block a user