Fixing push command chain

This commit is contained in:
Alexander Olofsson 2021-09-23 09:50:53 +02:00
parent 41549f0851
commit bba2e8b456
No known key found for this signature in database
GPG key ID: D439C9470CB04C73

View file

@ -30,6 +30,7 @@ pages:
- public - public
only: only:
- master@ananace/charts - master@ananace/charts
when: never
push: push:
image: image:
@ -44,8 +45,10 @@ push:
- mkdir -p packaged - mkdir -p packaged
- (cd packaged; helm package ../charts/*) - (cd packaged; helm package ../charts/*)
- ls -d1 packaged/* | xargs -rn1 sh -c ' - 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" 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: variables:
CHANNEL: stable CHANNEL: stable
only:
- master@ananace/charts