Add support for '.tar.gz' tarballs for helm charts

Signed-off-by: Kamalashree N <nagaraj.kamalashree@gmail.com>
pull/6568/head
Kamalashree N 6 years ago
parent e247d30503
commit e0dff88346

@ -84,7 +84,7 @@ func lintChart(path string, vals map[string]interface{}, namespace string, stric
var chartPath string
linter := support.Linter{}
if strings.HasSuffix(path, ".tgz") {
if strings.HasSuffix(path, ".tgz") || strings.HasSuffix(path, ".tar.gz") {
tempDir, err := ioutil.TempDir("", "helm-lint")
if err != nil {
return linter, err

@ -26,6 +26,7 @@ var (
strict = false
archivedChartPath = "../../cmd/helm/testdata/testcharts/compressedchart-0.1.0.tgz"
archivedChartPathWithHyphens = "../../cmd/helm/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz"
archivedTarGzChartPath = "../../cmd/helm/testdata/testcharts/compressedchart-0.1.0.tar.gz"
invalidArchivedChartPath = "../../cmd/helm/testdata/testcharts/invalidcompressedchart0.1.0.tgz"
chartDirPath = "../../cmd/helm/testdata/testcharts/decompressedchart/"
chartMissingManifest = "../../cmd/helm/testdata/testcharts/chart-missing-manifest"
@ -42,6 +43,9 @@ func TestLintChart(t *testing.T) {
if _, err := lintChart(archivedChartPath, values, namespace, strict); err != nil {
t.Error(err)
}
if _, err := lintChart(archivedTarGzChartPath, values, namespace, strict); err != nil {
t.Error(err)
}
if _, err := lintChart(archivedChartPathWithHyphens, values, namespace, strict); err != nil {
t.Error(err)
}

Loading…
Cancel
Save