From be0cd3161857b7688b201a5827b9e9541c7063aa Mon Sep 17 00:00:00 2001 From: David Burke Date: Tue, 21 Dec 2021 15:34:13 -0500 Subject: [PATCH] Use gitlab helm chart hosting, helps towards #14 --- .gitlab-ci.yml | 41 +++++++++++++++++++++++++++-------------- README.md | 2 +- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fa08d26..2caeb09 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/README.md b/README.md index 58e2a51..cad92ac 100644 --- a/README.md +++ b/README.md @@ -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`