Implement the various values flags in lint [#3]

This commit is contained in:
Erin Call
2019-12-17 16:41:09 -08:00
parent 991bbf97b4
commit 51800c18d7
2 changed files with 45 additions and 1 deletions

View File

@@ -18,7 +18,19 @@ func (l *Lint) Execute(_ Config) error {
// Prepare gets the Lint ready to execute.
func (l *Lint) Prepare(cfg Config) error {
args := []string{"lint", l.Chart}
args := []string{"lint"}
if cfg.Values != "" {
args = append(args, "--set", cfg.Values)
}
if cfg.StringValues != "" {
args = append(args, "--set-string", cfg.StringValues)
}
for _, vFile := range cfg.ValuesFiles {
args = append(args, "--values", vFile)
}
args = append(args, l.Chart)
l.cmd = command(helmBin, args...)
l.cmd.Stdout(cfg.Stdout)