feat: --skip-repos for helmfile deps (#851)

Resolves #661
This commit is contained in:
KUOKA Yusuke
2019-09-12 19:33:18 +09:00
committed by GitHub
parent f79db2ec8d
commit 9d851cda3b
3 changed files with 13 additions and 2 deletions
+8
View File
@@ -115,6 +115,10 @@ func main() {
Value: "",
Usage: "pass args to helm exec",
},
cli.BoolFlag{
Name: "skip-repos",
Usage: "skip running `helm repo update` before running `helm dependency build`",
},
},
Action: action(func(run *app.App, c configImpl) error {
return run.Deps(c)
@@ -495,6 +499,10 @@ func (c configImpl) Set() []string {
return c.c.StringSlice("set")
}
func (c configImpl) SkipRepos() bool {
return c.c.Bool("skip-repos")
}
func (c configImpl) Values() []string {
return c.c.StringSlice("values")
}
+1
View File
@@ -26,6 +26,7 @@ type DeprecatedChartsConfigProvider interface {
type DepsConfigProvider interface {
Args() string
SkipRepos() bool
}
type ReposConfigProvider interface {
+4 -2
View File
@@ -31,8 +31,10 @@ func (r *Run) askForConfirmation(msg string) bool {
func (r *Run) Deps(c DepsConfigProvider) []error {
r.helm.SetExtraArgs(argparser.GetArgs(c.Args(), r.state)...)
if errs := r.ctx.SyncReposOnce(r.state, r.helm); errs != nil && len(errs) > 0 {
return errs
if !c.SkipRepos() {
if errs := r.ctx.SyncReposOnce(r.state, r.helm); errs != nil && len(errs) > 0 {
return errs
}
}
return r.state.UpdateDeps(r.helm)