mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-22 20:20:39 +00:00
Add quiet build option
This adds the option for using the `--quiet` flag during builds. Signed-off-by: Gary Kim <gary@garykim.dev>
This commit is contained in:
parent
00ee2c290c
commit
0099cd6056
@ -147,6 +147,11 @@ func main() {
|
|||||||
Usage: "build args",
|
Usage: "build args",
|
||||||
EnvVar: "PLUGIN_BUILD_ARGS_FROM_ENV",
|
EnvVar: "PLUGIN_BUILD_ARGS_FROM_ENV",
|
||||||
},
|
},
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "quiet",
|
||||||
|
Usage: "quiet docker build",
|
||||||
|
EnvVar: "PLUGIN_QUIET",
|
||||||
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "target",
|
Name: "target",
|
||||||
Usage: "build target",
|
Usage: "build target",
|
||||||
@ -269,6 +274,7 @@ func run(c *cli.Context) error {
|
|||||||
LabelSchema: c.StringSlice("label-schema"),
|
LabelSchema: c.StringSlice("label-schema"),
|
||||||
NoCache: c.Bool("no-cache"),
|
NoCache: c.Bool("no-cache"),
|
||||||
AddHost: c.StringSlice("add-host"),
|
AddHost: c.StringSlice("add-host"),
|
||||||
|
Quiet: c.Bool("quiet"),
|
||||||
},
|
},
|
||||||
Daemon: docker.Daemon{
|
Daemon: docker.Daemon{
|
||||||
Registry: c.String("docker.registry"),
|
Registry: c.String("docker.registry"),
|
||||||
|
@ -56,6 +56,7 @@ type (
|
|||||||
Labels []string // Label map
|
Labels []string // Label map
|
||||||
NoCache bool // Docker build no-cache
|
NoCache bool // Docker build no-cache
|
||||||
AddHost []string // Docker build add-host
|
AddHost []string // Docker build add-host
|
||||||
|
Quiet bool // Docker build quiet
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plugin defines the Docker plugin parameters.
|
// Plugin defines the Docker plugin parameters.
|
||||||
@ -243,6 +244,9 @@ func commandBuild(build Build) *exec.Cmd {
|
|||||||
if build.Target != "" {
|
if build.Target != "" {
|
||||||
args = append(args, "--target", build.Target)
|
args = append(args, "--target", build.Target)
|
||||||
}
|
}
|
||||||
|
if build.Quiet {
|
||||||
|
args = append(args, "--quiet")
|
||||||
|
}
|
||||||
|
|
||||||
labelSchema := []string{
|
labelSchema := []string{
|
||||||
"schema-version=1.0",
|
"schema-version=1.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user