Fix --skip-cleanup to work with chartify (#1860)
This commit is contained in:
parent
c881544255
commit
97bab23e0c
|
|
@ -237,6 +237,7 @@ func (a *App) Template(c TemplateConfigProvider) error {
|
||||||
SkipRepos: c.SkipDeps(),
|
SkipRepos: c.SkipDeps(),
|
||||||
SkipDeps: c.SkipDeps(),
|
SkipDeps: c.SkipDeps(),
|
||||||
IncludeCRDs: &includeCRDs,
|
IncludeCRDs: &includeCRDs,
|
||||||
|
SkipCleanup: c.SkipCleanup(),
|
||||||
}, func() {
|
}, func() {
|
||||||
ok, errs = a.template(run, c)
|
ok, errs = a.template(run, c)
|
||||||
})
|
})
|
||||||
|
|
@ -390,6 +391,7 @@ func (a *App) Apply(c ApplyConfigProvider) error {
|
||||||
Wait: c.Wait(),
|
Wait: c.Wait(),
|
||||||
WaitForJobs: c.WaitForJobs(),
|
WaitForJobs: c.WaitForJobs(),
|
||||||
IncludeCRDs: &includeCRDs,
|
IncludeCRDs: &includeCRDs,
|
||||||
|
SkipCleanup: c.RetainValuesFiles() || c.SkipCleanup(),
|
||||||
}, func() {
|
}, func() {
|
||||||
matched, updated, es := a.apply(run, c)
|
matched, updated, es := a.apply(run, c)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -964,6 +964,7 @@ type ChartPrepareOptions struct {
|
||||||
SkipRepos bool
|
SkipRepos bool
|
||||||
SkipDeps bool
|
SkipDeps bool
|
||||||
SkipResolve bool
|
SkipResolve bool
|
||||||
|
SkipCleanup bool
|
||||||
IncludeCRDs *bool
|
IncludeCRDs *bool
|
||||||
Wait bool
|
Wait bool
|
||||||
WaitForJobs bool
|
WaitForJobs bool
|
||||||
|
|
@ -1108,7 +1109,9 @@ func (st *HelmState) PrepareCharts(helm helmexec.Interface, dir string, concurre
|
||||||
isLocal := st.directoryExistsAt(normalizeChart(st.basePath, chartName))
|
isLocal := st.directoryExistsAt(normalizeChart(st.basePath, chartName))
|
||||||
|
|
||||||
chartification, clean, err := st.PrepareChartify(helm, release, chartPath, workerIndex)
|
chartification, clean, err := st.PrepareChartify(helm, release, chartPath, workerIndex)
|
||||||
defer clean()
|
if !opts.SkipCleanup {
|
||||||
|
defer clean()
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
results <- &chartPrepareResult{err: err}
|
results <- &chartPrepareResult{err: err}
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue