mirror of
https://github.com/helm/chart-testing.git
synced 2026-02-05 09:45:14 +01:00
Feature: add extra flags to skip helm dependencies download and upgrade Go to 1.23 (#690)
Signed-off-by: cpanato <ctadeu@gmail.com>
This commit is contained in:
committed by
GitHub
parent
821eb0390c
commit
3e61ea4c85
@@ -384,17 +384,21 @@ func (t *Testing) processCharts(action func(chart *Chart) TestResult) ([]TestRes
|
||||
}
|
||||
defer t.git.RemoveWorktree(worktreePath) // nolint: errcheck
|
||||
|
||||
for _, chart := range charts {
|
||||
if err := t.helm.BuildDependenciesWithArgs(t.computePreviousRevisionPath(chart.Path()), t.config.HelmDependencyExtraArgs); err != nil {
|
||||
// Only print error (don't exit) if building dependencies for previous revision fails.
|
||||
fmt.Printf("failed building dependencies for previous revision of chart %q: %v\n", chart, err.Error())
|
||||
if !t.config.SkipHelmDependencies {
|
||||
for _, chart := range charts {
|
||||
if err := t.helm.BuildDependenciesWithArgs(t.computePreviousRevisionPath(chart.Path()), t.config.HelmDependencyExtraArgs); err != nil {
|
||||
// Only print error (don't exit) if building dependencies for previous revision fails.
|
||||
fmt.Printf("failed building dependencies for previous revision of chart %q: %v\n", chart, err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for _, chart := range charts {
|
||||
if err := t.helm.BuildDependenciesWithArgs(chart.Path(), t.config.HelmDependencyExtraArgs); err != nil {
|
||||
return nil, fmt.Errorf("failed building dependencies for chart %q: %w", chart, err)
|
||||
if !t.config.SkipHelmDependencies {
|
||||
if err := t.helm.BuildDependenciesWithArgs(chart.Path(), t.config.HelmDependencyExtraArgs); err != nil {
|
||||
return nil, fmt.Errorf("failed building dependencies for chart %q: %w", chart, err)
|
||||
}
|
||||
}
|
||||
|
||||
result := action(chart)
|
||||
|
||||
@@ -52,6 +52,7 @@ type Configuration struct {
|
||||
ValidateMaintainers bool `mapstructure:"validate-maintainers"`
|
||||
ValidateChartSchema bool `mapstructure:"validate-chart-schema"`
|
||||
ValidateYaml bool `mapstructure:"validate-yaml"`
|
||||
SkipHelmDependencies bool `mapstructure:"skip-helm-dependencies"`
|
||||
AdditionalCommands []string `mapstructure:"additional-commands"`
|
||||
CheckVersionIncrement bool `mapstructure:"check-version-increment"`
|
||||
ProcessAllCharts bool `mapstructure:"all"`
|
||||
|
||||
Reference in New Issue
Block a user