build: Refactor helm-chart upload
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Danny Bessems 2023-07-11 09:36:55 +02:00
parent 878107623e
commit d6e01f3c23

View File

@ -40,16 +40,20 @@ steps:
- name: Package & publish
image: bv11-cr01.bessems.eu/proxy/alpine/helm
commands:
- |
apk add yq
- |
helm package ./charts/json-server
- |
CHART_VERSION=$(cat ./charts/json-server/Chart.yaml | yq '.version')
curl \
--header "Authorization: token $GIT_APIKEY" \
--upload-file json-server-$CHART_VERSION.tgz \
https://code.spamasaurus.com/api/packages/$GIT_USERNAME/helm/api/charts
helm plugin install https://github.com/chartmuseum/helm-push
- |
helm repo add \
--username $GIT_USERNAME \
--password $GIT_APIKEY \
spamasaurus \
https://code.spamasaurus.com/api/packages/$GIT_USERNAME/helm
- |
helm cm-push \
spamasaurus \
json-server-*.tgz
environment:
GIT_APIKEY:
from_secret: git_apikey