forked from captnbp/opensearch-dashboards-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
42 lines (37 loc) · 1.11 KB
/
.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
34
35
36
37
38
39
40
41
42
image: captnbp/gitlab-ci-image:latest
stages:
- test
- release
.template:helm:lint:
stage: test
script:
- helm dependency update
- helm lint .
tags:
- server
.template:helm:publish:
stage: release
script:
- helm dependency update
- helm plugin install https://github.com/chartmuseum/helm-push
- helm plugin install https://github.com/hypnoglow/helm-s3.git
- helm package .
- export CHART=$(ls ${CHART_NAME}-*.tgz)
- helm repo add --username gitlab-ci-token --password ${CI_JOB_TOKEN} gitlab https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/helm/${CHART_NAME}
- helm repo add charts s3://charts/
- helm cm-push ${CHART} gitlab
- helm s3 push --force ${CHART} charts
- helm registry login registry-1.docker.io --username ${DOCKER_USERNAME} --password "${DOCKER_PASSWORD}"
- helm push ${CHART} oci://registry-1.docker.io/captnbp/
tags:
- server
lint:
extends:
- .template:helm:lint
variables:
CHART_NAME: opensearch-dashboards
publish:
extends:
- .template:helm:publish
variables:
CHART_NAME: opensearch-dashboards