From 16cb6908e74146dffe22b752c9135469c40faf1f Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 14 Feb 2024 18:07:16 +0100 Subject: [PATCH 1/2] rename "secret" with "secrets" --- cmd/docker-buildx/config.go | 8 ++++---- plugin/docker.go | 4 ++-- plugin/impl.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/docker-buildx/config.go b/cmd/docker-buildx/config.go index 87046d0..9e56a4e 100644 --- a/cmd/docker-buildx/config.go +++ b/cmd/docker-buildx/config.go @@ -184,10 +184,10 @@ func settingsFlags(settings *plugin.Settings) []cli.Flag { Destination: &settings.Build.ArgsEnv, }, &cli.StringSliceFlag{ - Name: "secret", - EnvVars: []string{"PLUGIN_SECRET"}, - Usage: "sets custom secret argument for the build", - Destination: &settings.Build.Secret, + Name: "secrets", + EnvVars: []string{"PLUGIN_SECRETS"}, + Usage: "sets custom secret arguments for the build", + Destination: &settings.Build.Secrets, }, &cli.BoolFlag{ Name: "quiet", diff --git a/plugin/docker.go b/plugin/docker.go index 25e7202..527e9c2 100644 --- a/plugin/docker.go +++ b/plugin/docker.go @@ -94,8 +94,8 @@ func commandBuild(build Build, dryrun bool) *exec.Cmd { for _, arg := range append(defaultBuildArgs, build.Args.Value()...) { args = append(args, "--build-arg", arg) } - for _, secret := range build.Secret.Value() { - args = append(args, "--secret", secret) + for _, secret := range build.Secrets.Value() { + args = append(args, "--secrets", secret) } for _, host := range build.AddHost.Value() { args = append(args, "--add-host", host) diff --git a/plugin/impl.go b/plugin/impl.go index 5d6af2c..55708bf 100644 --- a/plugin/impl.go +++ b/plugin/impl.go @@ -69,7 +69,7 @@ type Build struct { Platforms cli.StringSlice // Docker build target platforms Args cli.StringSlice // Docker build args ArgsEnv cli.StringSlice // Docker build args from env - Secret cli.StringSlice // Docker build secret + Secrets cli.StringSlice // Docker build secret Target string // Docker build target Output string // Docker build output Pull bool // Docker build pull From 8926c8918396d17ecd7053d74de1746f76046cbf Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 14 Feb 2024 18:07:27 +0100 Subject: [PATCH 2/2] update secret documentation --- docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs.md b/docs.md index ea8b7fa..6f882ae 100644 --- a/docs.md +++ b/docs.md @@ -118,7 +118,7 @@ docker-build: | `default_labels`/`auto_labels` | `true` | sets docker image labels based on git information | | `build_args` | _none_ | sets custom build arguments for the build | | `build_args_from_env` | _none_ | forwards environment variables as custom arguments to the build | -| `secret` | _none_ | Sets the build secret for the build | +| `secrets` | _none_ | Sets the build secrets for the build | | `quiet` | `false` | enables suppression of the build output | | `target` | _none_ | sets the build target to use | | `cache_from` | _none_ | sets configuration for cache source |