Skip to content

Commit

Permalink
feat: add skipTests to ignore helm test directory on manifest generation
Browse files Browse the repository at this point in the history
Signed-off-by: Imre Nagi <imre.nagi@gojek.com>
  • Loading branch information
imrenagi committed Oct 31, 2022
1 parent aa0bf34 commit ea71002
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs-v2/content/en/schemas/v3.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

0 comments on commit ea71002

Please sign in to comment.