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:
parent
a027b23698
commit
268a4808e9
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ ${kubectl} create namespace ${test_ns} || fail "Could not create namespace ${tes
|
|||
. ${dir}/test-cases/chart-needs.sh
|
||||
. ${dir}/test-cases/postrender.sh
|
||||
. ${dir}/test-cases/chartify.sh
|
||||
. ${dir}/test-cases/deps-mr-1011.sh
|
||||
|
||||
# ALL DONE -----------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
deps_mr_1011_input_dir="${cases_dir}/deps-mr-1011/input"
|
||||
|
||||
config_file="helmfile.yaml"
|
||||
|
||||
test_start "helmfile deps nonreg for #1011"
|
||||
|
||||
${helmfile} -f ${deps_mr_1011_input_dir}/${config_file} deps || fail "\"helmfile deps\" shouldn't fail"
|
||||
|
||||
test_pass "helmfile deps nonreg for #1011"
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
repositories:
|
||||
- name: rook-release
|
||||
url: https://charts.rook.io/release
|
||||
- name: incubator
|
||||
url: https://charts.helm.sh/incubator
|
||||
|
||||
releases:
|
||||
- name: rook-ceph
|
||||
chart: rook-release/rook-ceph
|
||||
version: 1.12.x
|
||||
dependencies:
|
||||
- chart: incubator/raw
|
||||
version: x
|
||||
Loading…
Reference in New Issue