forked from OpenCSGs/csghub-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
34 lines (29 loc) · 859 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
workflow:
rules:
- if: $CI_COMMIT_TAG =~ /^v\d+.\d+.\d+$/
stages:
- package
- publish
variables:
CHART_NAME: "csghub"
CHART_PATH: "./helm-chart/charts/csghub"
HELM_REGISTRY: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable"
before_script:
- apt update && apt install -y curl git
- curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
- chmod 700 get_helm.sh
- ./get_helm.sh
package:
stage: package
image: ubuntu:22.04
script:
- helm package $CHART_PATH -d ./
- helm repo add --username $CI_REGISTRY_USER --password $CI_REGISTRY_PASSWORD $CHART_NAME $HELM_REGISTRY
- helm plugin install https://github.com/chartmuseum/helm-push
- helm cm-push *.tgz $CHART_NAME
tags:
- external
artifacts:
paths:
- "*.tgz"
expire_in: 1 week