jenkinsjenkins-pipelinekubernetes-helmharbor

Helm push with user credentials


have a pipeline for installation/deploying db cluster Patroni(Postgress). Cheerfully had been designing my pipeline and stack with kinda type of error below.

Most obvious remarks:

  1. And Yes, i had logged in my remote registry
  2. Harbor had been deployed by official helm chart 3 Docker images have pulled succesfully
  3. Keep my credentials in Jenkins. -
usernamePassword(credentialsId: 'HarborCredentials', 
                 passwordVariable: 'PASSWORD_VAR', 
                 usernameVariable: 'USERNAME')]) {
                    sh "helm registry login -u $USERNAME -p $PASSWORD_VAR mydomain

QUESTION: How i can keep myself logged in registry for pull/push my helm charts? pipe "|" doesn't work

GOAL: What i want? Get a good solution for this issue. Theoretically find out several of them.

ERROR:

Login Succeeded
helm pull oci://mydomain/helm-charts/pxc-operator --version 1.14.0
Error: pulling from host mydomain failed with status code [manifests 1.14.0]: 401 Unauthorized

Bruh, I described above


Solution

  • Solved this issue by upgrading helm version and pedantically observing path oci://[you_domain]/[your_repo]/[your_chart] - exclude last if you have to push Also you can use Robot Account for it simplification