From 9b7030dd56ea68114ba809dfa62f56a4292cbf6e Mon Sep 17 00:00:00 2001 From: "marcus.cheng" Date: Mon, 26 Jun 2023 13:53:13 +0800 Subject: [PATCH] fix: during build, do not add repo url to repositories.yaml if it is not https --- internal/build.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/build.go b/internal/build.go index 177f1f4..e755877 100644 --- a/internal/build.go +++ b/internal/build.go @@ -78,6 +78,14 @@ func (builder *Builder) generateRepositoryConfig(repositoryConfigName string, ch for _, dep := range chartYaml["dependencies"].([]interface{}) { d := dep.(map[interface{}]interface{}) repositoryUrl := d["repository"].(string) + + // Do not include repository url in the repositories.yaml if it is not https + // Helm does not create an [app]-index.yaml that contains all the version of the chart for non-https repo + // Including the url in the repositories.yaml will cause the helm to lookup for the index file and fail + if !strings.HasPrefix(repositoryUrl, "https://") { + continue + } + name := d["name"].(string) username := "" password := ""