From bba2e8b456141d2c2226b11c7df3d1a404611a74 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Thu, 23 Sep 2021 09:50:53 +0200 Subject: [PATCH] Fixing push command chain --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b983e38..cce9d71 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,7 @@ pages: - public only: - master@ananace/charts + when: never push: image: @@ -44,8 +45,10 @@ push: - mkdir -p packaged - (cd packaged; helm package ../charts/*) - ls -d1 packaged/* | xargs -rn1 sh -c ' - curl --user gitlab-ci-token:$CI_JOB_TOKEN "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable/charts/$(basename $0)" -Iso /dev/null -w "%{http_code}" | grep 200 || \ + curl --user gitlab-ci-token:$CI_JOB_TOKEN "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable/charts/$(basename $0)" -Iso /dev/null -w "%{http_code}" | grep 200 || 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 + only: + - master@ananace/charts