Teach fn build --no-cache to avoid using cached steps

This commit is contained in:
Will Price
2017-07-20 09:54:14 -07:00
committed by James Jeffrey
parent 0b736b4b1c
commit c734efefce
3 changed files with 25 additions and 7 deletions

View File

@@ -20,6 +20,7 @@ func build() cli.Command {
type buildcmd struct {
verbose bool
noCache bool
}
func (b *buildcmd) flags() []cli.Flag {
@@ -29,6 +30,11 @@ func (b *buildcmd) flags() []cli.Flag {
Usage: "verbose mode",
Destination: &b.verbose,
},
cli.BoolFlag{
Name: "no-cache",
Usage: "Don't use docker cache",
Destination: &b.noCache,
},
}
}
@@ -45,7 +51,7 @@ func (b *buildcmd) build(c *cli.Context) error {
return err
}
ff, err := buildfunc(verbwriter, fn)
ff, err := buildfunc(verbwriter, fn, b.noCache)
if err != nil {
return err
}