Add dependencies_action configuration option
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package helm
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/pelotech/drone-helm3/internal/env"
|
||||
"github.com/pelotech/drone-helm3/internal/run"
|
||||
@@ -30,6 +31,10 @@ func NewPlan(cfg env.Config) (*Plan, error) {
|
||||
cfg: cfg,
|
||||
}
|
||||
|
||||
if cfg.UpdateDependencies && cfg.DependenciesAction != "" {
|
||||
return nil, errors.New("update_dependencies is deprecated and cannot be provided together with dependencies_action")
|
||||
}
|
||||
|
||||
p.steps = (*determineSteps(cfg))(cfg)
|
||||
|
||||
for i, step := range p.steps {
|
||||
@@ -91,9 +96,15 @@ var upgrade = func(cfg env.Config) []Step {
|
||||
for _, repo := range cfg.AddRepos {
|
||||
steps = append(steps, run.NewAddRepo(cfg, repo))
|
||||
}
|
||||
|
||||
if cfg.DependenciesAction != "" {
|
||||
steps = append(steps, run.NewDepAction(cfg))
|
||||
}
|
||||
|
||||
if cfg.UpdateDependencies {
|
||||
steps = append(steps, run.NewDepUpdate(cfg))
|
||||
}
|
||||
|
||||
steps = append(steps, run.NewUpgrade(cfg))
|
||||
|
||||
return steps
|
||||
|
||||
Reference in New Issue
Block a user