mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Teach fn build --no-cache to avoid using cached steps
This commit is contained in:
committed by
James Jeffrey
parent
0b736b4b1c
commit
c734efefce
@@ -39,6 +39,7 @@ type deploycmd struct {
|
||||
verbose bool
|
||||
incremental bool
|
||||
skippush bool
|
||||
noCache bool
|
||||
|
||||
verbwriter io.Writer
|
||||
}
|
||||
@@ -62,6 +63,11 @@ func (p *deploycmd) flags() []cli.Flag {
|
||||
Usage: "uses incremental building",
|
||||
Destination: &p.incremental,
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "no-cache",
|
||||
Usage: "Don't use Docker cache for the build",
|
||||
Destination: &p.noCache,
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "skip-push",
|
||||
Usage: "does not push Docker built images onto Docker Hub - useful for local development.",
|
||||
@@ -126,7 +132,7 @@ func (p *deploycmd) deploy(c *cli.Context, funcFilePath string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
funcfile, err := buildfunc(p.verbwriter, funcFileName)
|
||||
funcfile, err := buildfunc(p.verbwriter, funcFileName, p.noCache)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user