Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add skipTests to ignore helm test directory on manifest generation #8011

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs-v2/content/en/schemas/v4beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2164,6 +2164,12 @@
"x-intellij-html-description": "should build dependencies be skipped. Ignored for <code>remoteChart</code>.",
"default": "false"
},
"skipTests": {
"type": "boolean",
"description": "should ignore helm test during manifests generation.",
"x-intellij-html-description": "should ignore helm test during manifests generation.",
"default": "false"
},
"upgradeOnChange": {
"type": "boolean",
"description": "specifies whether to upgrade helm chart on code changes. Default is `true` when helm chart is local (has `chartPath`). Default is `false` when helm chart is remote (has `remoteChart`).",
Expand Down Expand Up @@ -2210,6 +2216,7 @@
"wait",
"recreatePods",
"skipBuildDependencies",
"skipTests",
"useHelmSecrets",
"repo",
"upgradeOnChange",
Expand Down
4 changes: 4 additions & 0 deletions pkg/skaffold/render/renderer/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ func (h Helm) generateHelmManifests(ctx context.Context, builds []graph.Artifact
return nil, helm.UserErr("construct override args", err)
}

if release.SkipTests {
args = append(args, "--skip-tests")
}

namespace, err := helm.ReleaseNamespace(h.namespace, release)
if err != nil {
return nil, err
Expand Down
4 changes: 4 additions & 0 deletions pkg/skaffold/schema/latest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,10 @@ type HelmRelease struct {
// Ignored for `remoteChart`.
SkipBuildDependencies bool `yaml:"skipBuildDependencies,omitempty"`

// SkipTests should ignore helm test during manifests generation.
// Defaults to `false`
SkipTests bool `yaml:"skipTests,omitempty"`

// UseHelmSecrets instructs skaffold to use secrets plugin on deployment.
UseHelmSecrets bool `yaml:"useHelmSecrets,omitempty"`

Expand Down