diff --git a/README.md b/README.md index 7b36732..e05909f 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,9 @@ _(As a convention in the list below, all task parameters are specified with a (`,`) list of key-value pairs (using syntax `hostname=ip-address`), each defining an IP address for resolving some custom hostname. +* `$BUILDKIT_EXTRA_CONFIG` (default empty): a string written verbatim to builkit's + TOML config file. See [buildkitd.toml](https://docs.docker.com/build/buildkit/toml-configuration/). + > Note: this is the main pain point with reusable tasks - env vars are kind of > an awkward way to configure a task. Once the RFC lands these will turn into a > JSON structure similar to configuring `params` on a resource, and task params diff --git a/buildkitd.go b/buildkitd.go index a2e65cc..b059c3e 100644 --- a/buildkitd.go +++ b/buildkitd.go @@ -173,6 +173,13 @@ func generateConfig(req Request, configPath string) error { return err } + if len(req.Config.BuildkitExtraConfig) > 0 { + _, err = f.WriteString(req.Config.BuildkitExtraConfig) + if err != nil { + return err + } + } + return f.Close() } diff --git a/types.go b/types.go index 8987185..5158b2f 100644 --- a/types.go +++ b/types.go @@ -64,6 +64,8 @@ type Config struct { BuildkitSecrets map[string]string `json:"buildkit_secrets" envconfig:"optional"` + BuildkitExtraConfig string `json:"buildkit_extra_config" envconfig:"BUILDKIT_EXTRA_CONFIG,optional"` + // Unpack the OCI image into Concourse's rootfs/ + metadata.json image scheme. // // Theoretically this would go away if/when we standardize on OCI.