Put step-specific config in those steps [#61]

This is just something that's been bugging me for a while--they're
specific to Lint and Upgrade, so that's where they belong.
This commit is contained in:
Erin Call
2020-01-02 11:38:41 -08:00
parent 7d750f097d
commit 4330728215
7 changed files with 68 additions and 58 deletions

View File

@@ -6,8 +6,11 @@ import (
// Lint is an execution step that calls `helm lint` when executed.
type Lint struct {
Chart string
cmd cmd
Chart string
Values string
StringValues string
ValuesFiles []string
cmd cmd
}
// Execute executes the `helm lint` command.
@@ -32,13 +35,13 @@ func (l *Lint) Prepare(cfg Config) error {
args = append(args, "lint")
if cfg.Values != "" {
args = append(args, "--set", cfg.Values)
if l.Values != "" {
args = append(args, "--set", l.Values)
}
if cfg.StringValues != "" {
args = append(args, "--set-string", cfg.StringValues)
if l.StringValues != "" {
args = append(args, "--set-string", l.StringValues)
}
for _, vFile := range cfg.ValuesFiles {
for _, vFile := range l.ValuesFiles {
args = append(args, "--values", vFile)
}