jx: Jenkins Build fails with the error - failed to read the Helm version: failed to run 'helm version --short' command in directory '.', output: 'Client: v2.10.0+g9ad53a a
Summary
Jenkins build fails with the message
+ jx step helm release
No $CHART_REPOSITORY defined so using the default value of: http://jenkins-x-chartmuseum:8080
Using helmBinary helm with feature flag: none
error: failed to build dependencies for chart from directory '.': failed to read the Helm version: failed to run 'helm version --short' command in directory '.', output: 'Client: v2.10.0+g9ad53aa
Error: forwarding ports: error upgrading connection: the server could not find the requested resource': exit status 1
Steps to reproduce the behavior
-
Create a Kubernetes cluster in GKE
jx create cluster gke --skip-login --default-admin-password=mySecretPassWord123 -n myclustername
-
Create a Spring boot service-
jx create spring -d web -d actuator
Jx version
The output of jx version
is:
NAME VERSION
jx 1.3.439
jenkins x platform 0.0.2771
Kubernetes cluster v1.9.7-gke.6
kubectl v1.10.7
helm client v2.11.0+g2e55dbe
helm server v2.11.0+g2e55dbe
git git version 2.11.0
Kubernetes cluster
Using a Kubernetes cluster with GKE which was created via the command
jx create cluster gke --skip-login --default-admin-password=password -n myclustername
Operating system / Environment
Google cloud shell
Repository created by jx
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 7
- Comments: 21
Commits related to this issue
- Update Helm to 2.11.0 fix for https://github.com/jenkins-x/jx/issues/1998 — committed to bryanlarsen/builder-base by bryanlarsen 6 years ago
- Update Helm to 2.11.0 (#653) fix for https://github.com/jenkins-x/jx/issues/1998 — committed to jenkins-x/builder-base by bryanlarsen 6 years ago
The upgrade to 2.11 works for me when I manually run the step.
helm init --upgrade
CHART_REPOSITORY=http://chartmuseum.jx.example.com jx step helm release
The problem is that the helm binary in the
nodejs
container on my jenkins is still 2.10, even though my cluster has the 2.11 tiller. How do I upgrade my container’s helm client?I had the same error. For some reason, I didn’t have the global env TILLER_NAMESPACE configured. I setted it to kube-system and now everything works fine.
same with version 2.11
if any body have solution for this error
WARNING: No $CHART_REPOSITORY defined so using the default value of: http://jenkins-x-chartmuseum:8080 Adding missing Helm repo: storage.googleapis.com https://storage.googleapis.com/chartmuseum.jenkins-x.io Successfully added Helm repository storage.googleapis.com. Adding missing Helm repo: jenkins-x-chartmuseum http://jenkins-x-chartmuseum:8080 Successfully added Helm repository jenkins-x-chartmuseum. WARNING: No $CHART_REPOSITORY defined so using the default value of: http://jenkins-x-chartmuseum:8080 Uploading chart file python-app-1-0.0.4.tgz to http://jenkins-x-chartmuseum:8080/api/charts Received 401 response: {“error”:“unauthorized”} error: Failed to post chart to http://jenkins-x-chartmuseum:8080/api/charts due to response 401: {“error”:“unauthorized”}
Pipeline failed on stage ‘from-build-pack’ : container ‘step-promote-helm-release’. The execution of the pipeline has stopped.
I got
Error: Couldn't load repositories file (/home/jenkins/.helm/repository/repositories.yaml
jx version
jenkins configured global env TILLER_NAMESPACE but it doesn’t work. so we need to configure it manually. is it a bug?
@luca010 : thanks for the hint. I solved the same error in our environment the same way!