jenkins-x / jx

Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Cloud Native pipelines from Tekton

Home Page:https://jenkins-x.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(jx gitops) helmfile report 404 on private github pages

joshuasimon-taulia opened this issue · comments

the verify job runs just fine after committing the below contents of helmfile.yaml

repositories:
- name: jxgh
  url: https://jenkins-x-charts.github.io/repo
- name: my-org-github
  url: https://raw.githubusercontent.com/my-org/charts/gh-pages
  username: required
  password: '{{ requiredEnv "GITHUB_TOKEN" }}'
releases:
- chart: my-org-github/arc-runners
  version: 0.4.0
  name: arc-runners
  values:
  - jx-values.yaml
  - arc-runners-values.yaml.gotmpl

but the bootjob fails on the jx gitops helmfile report step because processHelmfile doesn't seem to know how to handle env vars

error: failed to process helmfile helmfiles/jx/helmfile.yaml: failed to create release info for my-org-github/arc-runners: failed to get chart metadata for arc-runners version: 0.4.0: failed to add helm repository my-org-github https://raw.githubusercontent.com/my-org/charts/gh-pages: failed to add the repository 'my-org-github' with URL 'https://raw.githubusercontent.com/my-org/charts/gh-pages': failed to run '/root/.jx/plugins/bin/helm-3.8.2 repo add my-org-github https://raw.githubusercontent.com/my-org/charts/gh-pages --username bot-my-org-github --password *****' command in directory '', output: 'Error: looks like "https://raw.githubusercontent.com/my-org/charts/gh-pages" is not a valid chart repository or cannot be reached: failed to fetch https://raw.githubusercontent.com/my-org/charts/gh-pages/index.yaml : 404 Not Found'
bash-5.1# jx gitops helmfile report --help

running a debug git-operator pod and running

/root/.jx/plugins/bin/helm-3.8.2 repo add my-org-github https://raw.githubusercontent.com/my-org/charts/gh-pages --username foo --password $GITHUB_TOKEN

works as well

We experience exactly the same issue.