New 🌊 wave for @helm

Commit 4dfbe41b

4dfbe41b0b17Merged

Dmitrii Antonov <[email protected]> · 3 years ago · 6 files · +1 added · ~5 modified

Description

Add charts cache for build command

Details

Commit
4dfbe41b0b17
Parent
f29a34a95cd7

pkg/action/build.gomodifiedView file

@@ -5,6 +5,7 @@
55 "sort"
66 "strings"
77
8+ "github.com/helmwave/helmwave/pkg/cache"
89 "github.com/helmwave/helmwave/pkg/plan"
910 log "github.com/sirupsen/logrus"
1011 "github.com/urfave/cli/v2"
@@ -12,13 +13,14 @@
1213
1314 // Build is struct for running 'build' CLI command.
1415 type Build struct {
15- yml *Yml
16- diff *Diff
17- plandir string
18- diffMode string
19- tags cli.StringSlice
20- matchAll bool
21- autoYml bool
16+ yml *Yml
17+ diff *Diff
18+ plandir string
19+ diffMode string
20+ chartsCacheDir string
21+ tags cli.StringSlice
22+ matchAll bool
23+ autoYml bool
2224
2325 // diffLive *DiffLive
2426 // diffLocal *DiffLocalPlan
@@ -41,6 +43,8 @@
4143 }
4244 }
4345
46+ cache.ChartsCache.Init(i.chartsCacheDir)
47+
4448 newPlan := plan.New(i.plandir)
4549 err = newPlan.Build(ctx, i.yml.file, i.normalizeTags(), i.matchAll, i.yml.templater)
4650 if err != nil {
@@ -103,6 +107,7 @@
103107 flagTags(&i.tags),
104108 flagMatchAllTags(&i.matchAll),
105109 flagDiffMode(&i.diffMode),
110+ flagChartsCacheDir(&i.chartsCacheDir),
106111
107112 &cli.BoolFlag{
108113 Name: "yml",