From 844890d9fe95e72c4865d7e15c3f21b629497f58 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Thu, 23 Sep 2021 08:44:46 +0200 Subject: [PATCH] Add preliminary helm push job --- .gitlab-ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a12fe5..2fd7101 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,3 +30,17 @@ pages: - public only: - 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