Skip to content

Commit

Permalink
fix: support loading oci helm dependencies referenced by chart stored…
Browse files Browse the repository at this point in the history
… in non-oci repo (argoproj#5917)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
  • Loading branch information
Alexander Matyushentsev authored Mar 30, 2021
1 parent 75a1ea0 commit d085636
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions util/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,19 @@ func (h *helm) Template(templateOpts *TemplateOpts) (string, error) {
}

func (h *helm) DependencyBuild() error {
for _, repo := range h.repos {
isHelmOci := h.cmd.IsHelmOci
defer func() {
h.cmd.IsHelmOci = isHelmOci
}()

for i := range h.repos {
repo := h.repos[i]
if repo.EnableOci {
h.cmd.IsHelmOci = true
_, err := h.cmd.Login(repo.Repo, repo.Creds)
h.cmd.IsHelmOci = false

defer func() {
h.cmd.IsHelmOci = true
_, _ = h.cmd.Logout(repo.Repo, repo.Creds)
h.cmd.IsHelmOci = false
}()

if err != nil {
Expand Down

0 comments on commit d085636

Please sign in to comment.