mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
controller: handle attestation options across api
We can perform all attestation processing, handling how the sbom and provenance arguments interact on the client, while applying defaults on the server. Additionally, this allows us to start pulling fields out of CommonOpts. Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
@ -455,11 +455,11 @@ func toSolveOpt(ctx context.Context, node builder.Node, multiDriver bool, opt Op
|
||||
return nil, nil, errors.Errorf("attestations are not supported by the current buildkitd")
|
||||
}
|
||||
for k, v := range attests {
|
||||
so.FrontendAttrs[k] = v
|
||||
so.FrontendAttrs["attest:"+k] = v
|
||||
}
|
||||
}
|
||||
|
||||
if _, ok := opt.Attests["attest:provenance"]; !ok && supportsAttestations {
|
||||
if _, ok := opt.Attests["provenance"]; !ok && supportsAttestations {
|
||||
const noAttestEnv = "BUILDX_NO_DEFAULT_ATTESTATIONS"
|
||||
var noProv bool
|
||||
if v, ok := os.LookupEnv(noAttestEnv); ok {
|
||||
|
Reference in New Issue
Block a user