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

View file

@ -7,7 +7,7 @@ Based on https://gitlab.com/burke-software/django-helm-chart/
# Usage
1. Add our Helm chart repo `helm repo add glitchtip https://glitchtip.gitlab.io/glitchtip-helm-chart/`
1. Add our Helm chart repo `helm repo add glitchtip https://gitlab.com/api/v4/projects/16325141/packages/helm/stable`
2. Review our values.yaml. At a minimum you'll need to set env.secret.DATABASE_URL and env.secret.SECRET_KEY.
3. Install the chart `helm install glitchtip/glitchtip`