mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-22 20:20:39 +00:00
commit
938e42ccc0
@ -202,6 +202,11 @@ func main() {
|
|||||||
Usage: "repository default branch",
|
Usage: "repository default branch",
|
||||||
EnvVar: "DRONE_REPO_BRANCH",
|
EnvVar: "DRONE_REPO_BRANCH",
|
||||||
},
|
},
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "no-cache",
|
||||||
|
Usage: "do not use cached intermediate containers",
|
||||||
|
EnvVar: "PLUGIN_NO_CACHE",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := app.Run(os.Args); err != nil {
|
if err := app.Run(os.Args); err != nil {
|
||||||
@ -232,6 +237,7 @@ func run(c *cli.Context) error {
|
|||||||
Compress: c.Bool("compress"),
|
Compress: c.Bool("compress"),
|
||||||
Repo: c.String("repo"),
|
Repo: c.String("repo"),
|
||||||
LabelSchema: c.StringSlice("label-schema"),
|
LabelSchema: c.StringSlice("label-schema"),
|
||||||
|
NoCache: c.Bool("no-cache"),
|
||||||
},
|
},
|
||||||
Daemon: docker.Daemon{
|
Daemon: docker.Daemon{
|
||||||
Registry: c.String("docker.registry"),
|
Registry: c.String("docker.registry"),
|
||||||
|
@ -49,6 +49,7 @@ type (
|
|||||||
Compress bool // Docker build compress
|
Compress bool // Docker build compress
|
||||||
Repo string // Docker build repository
|
Repo string // Docker build repository
|
||||||
LabelSchema []string // Label schema map
|
LabelSchema []string // Label schema map
|
||||||
|
NoCache bool // Docker build no-cache
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plugin defines the Docker plugin parameters.
|
// Plugin defines the Docker plugin parameters.
|
||||||
@ -198,6 +199,9 @@ func commandBuild(build Build) *exec.Cmd {
|
|||||||
if build.Pull {
|
if build.Pull {
|
||||||
args = append(args, "--pull=true")
|
args = append(args, "--pull=true")
|
||||||
}
|
}
|
||||||
|
if build.NoCache {
|
||||||
|
args = append(args, "--no-cache")
|
||||||
|
}
|
||||||
for _, arg := range build.ArgsEnv {
|
for _, arg := range build.ArgsEnv {
|
||||||
addProxyValue(&build, arg)
|
addProxyValue(&build, arg)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user