provenance: allow builder ID to set with attrs

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2022-12-07 19:38:08 -08:00
parent fe0c8d352a
commit 079505fb1b

View File

@@ -77,6 +77,8 @@ func ProvenanceProcessor(attrs map[string]string) llbsolver.Processor {
pr.Metadata.Reproducible = reproducible
pr.Metadata.BuildInvocationID = buildID
pr.Builder.ID = attrs["builder-id"]
var addLayers func() error
switch mode {
@@ -162,7 +164,6 @@ func ProvenanceProcessor(attrs map[string]string) llbsolver.Processor {
}
}
// TODO: pass indent to json.Marshal
return json.MarshalIndent(pr, "", " ")
},
})