transform secret from string to slice
This commit is contained in:
parent
7c5f14a957
commit
571bdce941
4 changed files with 9 additions and 9 deletions
|
|
@ -183,11 +183,11 @@ func settingsFlags(settings *plugin.Settings) []cli.Flag {
|
|||
Usage: "forwards environment variables as custom arguments to the build",
|
||||
Destination: &settings.Build.ArgsEnv,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "secret",
|
||||
EnvVars: []string{"PLUGIN_SECRET"},
|
||||
Usage: "sets custom secret argument for the build",
|
||||
Destination: &settings.Build.Secret,
|
||||
&cli.StringSliceFlag{
|
||||
Name: "secrets",
|
||||
EnvVars: []string{"PLUGIN_SECRETS"},
|
||||
Usage: "sets custom secret arguments for the build",
|
||||
Destination: &settings.Build.Secrets,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "quiet",
|
||||
|
|
|
|||
2
docs.md
2
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 |
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
if build.Secret != "" {
|
||||
args = append(args, "--secret", build.Secret)
|
||||
for _, secret := range build.Secrets.Value() {
|
||||
args = append(args, "--secret", secret)
|
||||
}
|
||||
for _, host := range build.AddHost.Value() {
|
||||
args = append(args, "--add-host", host)
|
||||
|
|
|
|||
|
|
@ -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 string // Docker build secret
|
||||
Secrets cli.StringSlice // Docker build secret
|
||||
Target string // Docker build target
|
||||
Output string // Docker build output
|
||||
Pull bool // Docker build pull
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue