Orb version
3.0.1
What happened
I have many jobs using the orb [email protected] without any problem
orbs:
helm: circleci/[email protected]
// ....step
- helm/install-helm-client:
version: v3.14.2
- helm/upgrade-helm-chart:
chart: ~/project/data-scheduler
release-name: data-scheduler
values-to-override: image.tag=${CIRCLE_BRANCH}-${CIRCLE_SHA1}
namespace: scheduler-${CIRCLE_BRANCH}
values: .circleci/environments/${CIRCLE_BRANCH}/values.yaml
I've tried to test with orb new version @3.0.1 to see if there is any differences
orbs:
helm: circleci/[email protected]
// ...steps
- helm/install_helm_client:
version: v3.14.2
- helm/upgrade-helm-chart:
chart: ~/project/data-scheduler
release_name:data-scheduler
values_to_override: image.tag=${CIRCLE_BRANCH}-${CIRCLE_SHA1}
namespace: scheduler-${CIRCLE_BRANCH}
values: .circleci/environments/${CIRCLE_BRANCH}/values.yaml
then it returns error saying:
+ helm upgrade --install ******************** '~/project/********************' --namespace=scheduler-dev --values .circleci/environments/dev/values.yaml --set image.tag=dev-6ab48824e5762a0ccaa8c2f743fc9f79ce914fe6
Error: repo ~ not found
Exited with code exit status 1
I was curious so I re-ran into SSH job, to my surprise, I was able to issue the command manually successfully. However, it doesn't work with the job execution helm/upgrade-helm-chart
.
Expected behavior
It should execute normally without any issue.
Comments
As I dig the script, it seems to be issue over here:
https://github.com/CircleCI-Public/helm-orb/blob/master/src/scripts/upgrade_helm_chart.sh
https://github.com/CircleCI-Public/helm-orb/blob/master/src/scripts/upgrade_helm_chart.sh#L66-L69
HELM_STR_ADD_REPO="$(echo "${HELM_STR_ADD_REPO}" | circleci env subst)"
if [ -n "${HELM_STR_ADD_REPO}" ]; then
helm repo add "${HELM_STR_RELEASE_NAME}" "${HELM_STR_ADD_REPO}"
helm repo update
fi
I do not think it is a good idea to put helm repo update
before executing install or upgrade. They are for different purposes.
My suggestions is to break out and create a new job for adding multiple repos, ex:
helm/repo_update:
- repos: "URL1","URL2"...