cache_to and cache_from are now string instead of cli.StringSlice
This commit is contained in:
parent
8c928fc303
commit
08ca33ec76
3 changed files with 8 additions and 8 deletions
|
|
@ -195,13 +195,13 @@ func settingsFlags(settings *plugin.Settings) []cli.Flag {
|
|||
Usage: "sets the build target to use",
|
||||
Destination: &settings.Build.Target,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
&cli.StringFlag{
|
||||
Name: "cache-from",
|
||||
EnvVars: []string{"PLUGIN_CACHE_FROM"},
|
||||
Usage: "sets images to consider as cache sources",
|
||||
Destination: &settings.Build.CacheFrom,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
&cli.StringFlag{
|
||||
Name: "cache-to",
|
||||
EnvVars: []string{"PLUGIN_CACHE_TO"},
|
||||
Usage: "cache destination for the build cache",
|
||||
|
|
|
|||
|
|
@ -78,11 +78,11 @@ func commandBuild(build Build, dryrun bool) *exec.Cmd {
|
|||
if build.NoCache {
|
||||
args = append(args, "--no-cache")
|
||||
}
|
||||
for _, arg := range build.CacheFrom.Value() {
|
||||
args = append(args, "--cache-from", arg)
|
||||
if build.CacheFrom != "" {
|
||||
args = append(args, "--cache-from", build.CacheFrom)
|
||||
}
|
||||
for _, arg := range build.CacheTo.Value() {
|
||||
args = append(args, "--cache-to", arg)
|
||||
if build.CacheTo != "" {
|
||||
args = append(args, "--cache-to", build.CacheTo)
|
||||
}
|
||||
for _, arg := range build.ArgsEnv.Value() {
|
||||
addProxyValue(&build, arg)
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ type Build struct {
|
|||
Target string // Docker build target
|
||||
Output string // Docker build output
|
||||
Pull bool // Docker build pull
|
||||
CacheFrom cli.StringSlice // Docker build cache-from
|
||||
CacheTo cli.StringSlice // Docker build cache-to
|
||||
CacheFrom string // Docker build cache-from
|
||||
CacheTo string // Docker build cache-to
|
||||
Compress bool // Docker build compress
|
||||
Repo cli.StringSlice // Docker build repository
|
||||
NoCache bool // Docker build no-cache
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue