Use gitlab helm chart hosting, helps towards #14

This commit is contained in:
David Burke 2021-12-21 15:34:13 -05:00
parent ef579f7f40
commit be0cd31618
2 changed files with 28 additions and 15 deletions

View file

@ -1,24 +1,37 @@
variables:
GIT_SUBMODULE_STRATEGY: recursive
image:
name: alpine/helm:3.6.3
entrypoint: ["/bin/sh", "-c"]
stages:
- build
- upload
lint:
stage: test
build:
image:
name: alpine/helm
entrypoint: ["/bin/sh", "-c"]
stage: build
script:
- helm lint
pages:
stage: deploy
script:
- helm package .
- helm repo index --url https://${CI_PROJECT_NAMESPACE}.gitlab.io/${CI_PROJECT_NAME} .
- mv index.yaml glitchtip-*.tgz ./public
- helm package -d chart .
- mv chart/glitchtip*.tgz chart/glitchtip.tgz
artifacts:
paths:
- public
- chart
upload:
image: curlimages/curl:latest
stage: upload
dependencies:
- build
script:
- 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@chart/glitchtip.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"'
only:
- master
- tags
pages:
stage: upload
artifacts:
paths:
- public
only:
- master