Update 4 files
- /scripts/helm-push.sh - /scripts/helm-login.sh - /templates/helm.tpl.yml - /pipelines/helm.yaml
This commit is contained in:
46
pipelines/helm.yaml
Normal file
46
pipelines/helm.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- publish
|
||||||
|
|
||||||
|
include:
|
||||||
|
- template: Security/Secret-Detection.gitlab-ci.yml
|
||||||
|
- project: 'developerdurp/yml'
|
||||||
|
ref: main
|
||||||
|
file:
|
||||||
|
- 'jobs/version.yml'
|
||||||
|
- 'jobs/helm.yml'
|
||||||
|
|
||||||
|
secret_detection:
|
||||||
|
stage: .pre
|
||||||
|
rules:
|
||||||
|
- when: always
|
||||||
|
allow_failure: false
|
||||||
|
|
||||||
|
version:
|
||||||
|
extends: .version
|
||||||
|
stage: .pre
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_REF_NAME == 'main'
|
||||||
|
- if: $CI_COMMIT_BRANCH =~ '/^release/'
|
||||||
|
|
||||||
|
helm-build:
|
||||||
|
extends: .helm-build
|
||||||
|
stage: build
|
||||||
|
needs:
|
||||||
|
- job: version
|
||||||
|
artifacts: true
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_REF_NAME == 'main'
|
||||||
|
- if: $CI_COMMIT_BRANCH =~ '/^release/'
|
||||||
|
|
||||||
|
helm:
|
||||||
|
extends: .helm-push
|
||||||
|
stage: publish
|
||||||
|
needs:
|
||||||
|
- job: helm-build
|
||||||
|
artifacts: false
|
||||||
|
- job: version
|
||||||
|
artifacts: true
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_REF_NAME == 'main'
|
||||||
|
- if: $CI_COMMIT_BRANCH =~ '/^release/'
|
||||||
5
scripts/helm-login.sh
Normal file
5
scripts/helm-login.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#%%MULTILINE_YAML_START
|
||||||
|
#Helm login
|
||||||
|
|
||||||
|
helm registry login ${CI_REGISTRY} -u gitlab-ci-token -p ${CI_JOB_TOKEN}
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
#%%MULTILINE_YAML_START
|
#%%MULTILINE_YAML_START
|
||||||
#Helm Push
|
#Helm Push
|
||||||
|
|
||||||
helm plugin install https://github.com/chartmuseum/helm-push
|
|
||||||
for chart in packages/*; do
|
for chart in packages/*; do
|
||||||
helm cm-push ./$chart ${CI_PROJECT_NAME}
|
helm push ./$chart oci://$CI_REGISTRY/$CI_PROJECT_PATH
|
||||||
done
|
done
|
||||||
@@ -1,6 +1,11 @@
|
|||||||
.helm-createchart:
|
.helm-build:
|
||||||
image: registry.durp.info/dtzar/helm-kubectl
|
image: dtzar/helm-kubectl
|
||||||
script:
|
script:
|
||||||
- ./scripts/helm-addrepo.sh
|
- ./scripts/variablecheck-version.sh
|
||||||
- ./scripts/helm-package.sh
|
- ./scripts/helm-package.sh
|
||||||
|
|
||||||
|
.helm_push:
|
||||||
|
image: dtzar/helm-kubectl
|
||||||
|
script:
|
||||||
|
- ./scripts/helm-registry-login.sh
|
||||||
- ./scripts/helm-push.sh
|
- ./scripts/helm-push.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user