Support for passing through raw buildkit policies

This adds an env var which can be used to pass in a path to a file to
read a buildkit source poliy from.

This is applied to any build is executed with the env set.
It is also applied to bakes (which are calling build behind the scenes).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2023-02-15 00:37:26 +00:00
parent 41e1693be0
commit 98efe7af10
6 changed files with 171 additions and 117 deletions

View File

@ -3,6 +3,7 @@ syntax = "proto3";
package buildx.controller.v1;
import "github.com/moby/buildkit/api/services/control/control.proto";
import "github.com/moby/buildkit/sourcepolicy/pb/policy.proto";
option go_package = "pb";
@ -75,6 +76,7 @@ message BuildOptions {
bool Pull = 25;
bool ExportPush = 26;
bool ExportLoad = 27;
moby.buildkit.v1.sourcepolicy.Policy SourcePolicy = 28;
}
message ExportEntry {