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