New ๐ŸŒŠ wave for @helm

Commit a4caf107

a4caf1075facMerged

Svyatoslav Dumchenko <[email protected]> ยท 5 years ago ยท 1 file ยท ~1 modified

Description

Fix planning in deploy action

Details

Commit
a4caf1075fac
Parent
7c7cb3a53b87

pkg/helmwave/cli.gomodifiedView file

@@ -29,7 +29,6 @@
2929 }
3030
3131 opts := &yml.SavePlanOptions{}
32- opts.File(c.PlanPath + PLANFILE).Dir(c.PlanPath)
3332
3433 switch ctx.Command.Name {
3534 case "repos":
@@ -42,6 +41,16 @@
4241 opts.PlanRepos().PlanReleases().PlanValues()
4342 }
4443
44+ return c.plan(opts)
45+}
46+
47+func (c *Config) plan(opts *yml.SavePlanOptions) error {
48+ if opts == nil {
49+ opts = &yml.SavePlanOptions{}
50+ }
51+
52+ opts.File(c.PlanPath + PLANFILE).Dir(c.PlanPath)
53+
4554 err := c.Tpl.Render()
4655 if err != nil {
4756 return err
@@ -58,7 +67,9 @@
5867 }
5968
6069 func (c *Config) CliDeploy(ctx *cli.Context) error {
61- err := c.CliPlan(ctx)
70+ opts := &yml.SavePlanOptions{}
71+ opts.PlanValues().PlanRepos().PlanValues()
72+ err := c.plan(opts)
6273 if err != nil {
6374 return err
6475 }