Skip to content
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 integration/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ var tests = []struct {
dir: "examples/custom",
pods: []string{"getting-started-custom"},
},
{
description: "helm templating charPath",
dir: "testdata/helm",
args: []string{"-p", "helm-templating-charPath"},
deployments: []string{"skaffold-helm"},
env: []string{"FOO=skaffold-helm"},
},
// TODO(#8811): Enable this test when issue is solve.
// {
// description: "buildpacks Go",
Expand Down
8 changes: 7 additions & 1 deletion integration/testdata/helm/skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,10 @@ profiles:
releases:
# seed test namespace in the release name.
- name: skaffold-helm-{{.TEST_NS}}
chartPath: skaffold-helm
chartPath: skaffold-helm
- name: helm-templating-charPath
deploy:
helm:
releases:
- name: skaffold-helm
chartPath: '{{.FOO}}'
5 changes: 5 additions & 0 deletions pkg/skaffold/deploy/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art
if err != nil {
return helm.UserErr(fmt.Sprintf("cannot expand repo %q", r.Repo), err)
}
r.ChartPath, err = util.ExpandEnvTemplateOrFail(r.ChartPath, nil)
if err != nil {
return helm.UserErr(fmt.Sprintf("cannot expand chart path %q", r.ChartPath), err)
}

m, results, err := h.deployRelease(ctx, out, releaseName, r, builds, h.bV, chartVersion, repo)
if err != nil {
return helm.UserErr(fmt.Sprintf("deploying %q", releaseName), err)
Expand Down