2019-05-17 08:57:08 +00:00
|
|
|
---
|
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
lint:charts:
|
|
|
|
image:
|
2020-08-10 08:17:50 +00:00
|
|
|
name: codenest/helm
|
2019-05-17 08:57:08 +00:00
|
|
|
entrypoint: ["/bin/sh", "-c"]
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- helm lint charts/*
|
|
|
|
|
|
|
|
pages:
|
|
|
|
image:
|
2020-08-10 08:17:50 +00:00
|
|
|
name: codenest/helm
|
2019-05-17 08:57:08 +00:00
|
|
|
entrypoint: ["/bin/sh", "-c"]
|
|
|
|
stage: deploy
|
2021-03-22 09:06:47 +00:00
|
|
|
before_script:
|
2021-05-28 09:24:28 +00:00
|
|
|
- grep 'repository:' charts/*/Chart.yaml | awk '{ print $3 }' | uniq | xargs -rn1 sh -c 'helm repo add $(basename $0) $0'
|
2021-03-22 09:06:47 +00:00
|
|
|
- helm repo update
|
2021-03-22 09:10:45 +00:00
|
|
|
- ls -d1 charts/* | xargs -rn1 helm dependency build --skip-refresh
|
2019-05-17 08:57:08 +00:00
|
|
|
script:
|
2020-05-24 09:52:24 +00:00
|
|
|
- mkdir -p public
|
2019-05-17 08:57:08 +00:00
|
|
|
- "echo \"User-Agent: *\nDisallow: /\" > ./public/robots.txt"
|
|
|
|
- (cd public; helm package ../charts/*)
|
|
|
|
- helm repo index public --url ${CI_PAGES_URL}
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
|
|
|
only:
|
|
|
|
- master@ananace/charts
|
2021-09-23 07:50:53 +00:00
|
|
|
when: never
|
2021-09-23 06:44:46 +00:00
|
|
|
|
|
|
|
push:
|
2021-09-23 06:47:34 +00:00
|
|
|
image:
|
|
|
|
name: codenest/helm
|
|
|
|
entrypoint: ["/bin/sh", "-c"]
|
2021-09-23 06:44:46 +00:00
|
|
|
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/*)
|
2021-09-23 07:11:59 +00:00
|
|
|
- ls -d1 packaged/* | xargs -rn1 sh -c '
|
2021-09-23 07:50:53 +00:00
|
|
|
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 ||
|
2021-09-23 07:11:59 +00:00
|
|
|
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"
|
|
|
|
'
|
2021-09-23 06:44:46 +00:00
|
|
|
variables:
|
|
|
|
CHANNEL: stable
|
2021-09-23 07:50:53 +00:00
|
|
|
only:
|
|
|
|
- master@ananace/charts
|