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

@@ -12,6 +12,9 @@ type Upgrade struct {
ChartVersion string
DryRun bool
Wait bool
Values string
StringValues string
ValuesFiles []string
ReuseValues bool
Timeout string
Force bool
@@ -62,13 +65,13 @@ func (u *Upgrade) Prepare(cfg Config) error {
if u.Force {
args = append(args, "--force")
}
if cfg.Values != "" {
args = append(args, "--set", cfg.Values)
if u.Values != "" {
args = append(args, "--set", u.Values)
}
if cfg.StringValues != "" {
args = append(args, "--set-string", cfg.StringValues)
if u.StringValues != "" {
args = append(args, "--set-string", u.StringValues)
}
for _, vFile := range cfg.ValuesFiles {
for _, vFile := range u.ValuesFiles {
args = append(args, "--values", vFile)
}