Add preliminary helm push job

This commit is contained in:
Alexander Olofsson 2021-09-23 08:44:46 +02:00
parent 38f8cb9b96
commit 844890d9fe
No known key found for this signature in database
GPG key ID: D439C9470CB04C73

View file

@ -30,3 +30,17 @@ pages:
- public - public
only: only:
- master@ananace/charts - master@ananace/charts
push:
image: curlimages/curl:latest
stage: deploy
before_script:
- grep 'repository:' charts/*/Chart.yaml | awk '{ print $3 }' | uniq | xargs -rn1 sh -c 'helm repo add $(basename $0) $0'
- helm repo update
- ls -d1 charts/* | xargs -rn1 helm dependency build --skip-refresh
script:
- mkdir -p packaged
- (cd packaged; helm package ../charts/*)
- ls -d1 packaged/* | xargs -rn1 sh -c 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@$0" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/${CHANNEL}/charts"'
variables:
CHANNEL: stable