build: forward all build opts everywhere

All build options should be passed everywhere - the frontend and the
backend of buildkit should both be able to see all attestations, as well
as all other opts: e.g. epoch settings, and no-cache.

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2022-12-15 17:53:21 +00:00
parent 662738a7e5
commit a8f689c223
3 changed files with 4 additions and 85 deletions

View File

@ -37,7 +37,6 @@ import (
"github.com/moby/buildkit/client"
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/exporter/containerimage/exptypes"
"github.com/moby/buildkit/frontend/attestations"
gateway "github.com/moby/buildkit/frontend/gateway/client"
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/session/upload/uploadprovider"
@ -1113,11 +1112,13 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
req := gateway.SolveRequest{
Frontend: so.Frontend,
FrontendOpt: so.FrontendAttrs,
FrontendInputs: frontendInputs,
FrontendOpt: make(map[string]string),
}
for k, v := range so.FrontendAttrs {
req.FrontendOpt[k] = v
}
so.Frontend = ""
so.FrontendAttrs = attestations.Filter(so.FrontendAttrs)
so.FrontendInputs = nil
ch, done := progress.NewChannel(pw)