run deps without chart preparation (#1011)

* nonreg for #1011

Signed-off-by: Cyril Jouve <jv.cyril@gmail.com>

* run deps without chart preparation

Signed-off-by: Cyril Jouve <jv.cyril@gmail.com>

---------

Signed-off-by: Cyril Jouve <jv.cyril@gmail.com>
This commit is contained in:
Cyril Jouve
2024-02-14 17:16:48 +08:00
committed by GitHub
parent a027b23698
commit 268a4808e9
5 changed files with 30 additions and 13 deletions
+1 -13
View File
@@ -120,19 +120,7 @@ func (a *App) Init(c InitConfigProvider) error {
func (a *App) Deps(c DepsConfigProvider) error {
return a.ForEachState(func(run *Run) (_ bool, errs []error) {
prepErr := run.withPreparedCharts("deps", state.ChartPrepareOptions{
SkipRepos: c.SkipRepos(),
SkipDeps: true,
SkipResolve: true,
Concurrency: c.Concurrency(),
}, func() {
errs = run.Deps(c)
})
if prepErr != nil {
errs = append(errs, prepErr)
}
errs = run.Deps(c)
return
}, c.IncludeTransitiveNeeds(), SetFilter(true))
}
+6
View File
@@ -104,6 +104,12 @@ func (r *Run) withPreparedCharts(helmfileCommand string, opts state.ChartPrepare
}
func (r *Run) Deps(c DepsConfigProvider) []error {
if !c.SkipRepos() {
if err := r.ctx.SyncReposOnce(r.state, r.helm); err != nil {
return []error{err}
}
}
r.helm.SetExtraArgs(GetArgs(c.Args(), r.state)...)
return r.state.UpdateDeps(r.helm, c.IncludeTransitiveNeeds())