From 5991743a38b25d4e43ddbdd06d569b0dd3a0be41 Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Wed, 9 Nov 2022 14:38:53 +0100 Subject: [PATCH] OZG-3075 add helm readme and change path --- Jenkinsfile | 11 +++++++---- src/main/helm/Chart.yaml | 2 +- src/main/helm/README.md | 24 ++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 src/main/helm/README.md diff --git a/Jenkinsfile b/Jenkinsfile index 8e851600e5..8d41e04223 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -192,12 +192,15 @@ pipeline { FAILED_GOOFY_STAGE=env.STAGE_NAME HELM_CHART_VERSION = generateHelmChartVersion() - sh "helm lint -f goofy-server/src/main/helm/test-values.yaml goofy-server/src/main/helm" - sh "helm unittest -f '../../test/helm/*.yaml' goofy-server/src/main/helm" + dir('src/main/helm') { + sh "helm lint -f test-values.yaml" - sh "helm package goofy-server/src/main/helm --version=${HELM_CHART_VERSION}" + sh "helm unittest -f '../../test/helm/*.yaml' ." - deployHelmChart(HELM_CHART_VERSION) + sh "helm package --version=${HELM_CHART_VERSION} ." + + deployHelmChart(HELM_CHART_VERSION) + } } } } diff --git a/src/main/helm/Chart.yaml b/src/main/helm/Chart.yaml index 408f1025e5..365e3e8719 100644 --- a/src/main/helm/Chart.yaml +++ b/src/main/helm/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v1 appVersion: "1.1" description: A Helm chart for Goofy name: goofy -version: 0.20.0-SNAPSHOT +version: 0.0.0-MANAGED-BY-JENKINS icon: https://simpleicons.org/icons/helm.svg diff --git a/src/main/helm/README.md b/src/main/helm/README.md new file mode 100644 index 0000000000..06d30da3fd --- /dev/null +++ b/src/main/helm/README.md @@ -0,0 +1,24 @@ +# Helm +## Linter +`helm lint -f test-values.yaml` +## Unit-Tests +Für Unit-Tests wird das helm [helm-unittest](https://github.com/quintush/helm-unittest) plugin benötigt. Die Unit-Tests liegen im Verzeichnis src/test/helm + +`helm unittest -f '../../test/helm/*.yaml' .` +## SyntaxCheck +`helm template --debug -f test-values.yaml .` + +## Package +`helm package --version=[version] .` + +## Versionierung +Jenkins verwendet die Version aus der pom.xml + +### Master Branch +Im master Branch werden die ersten 7 Zeichen vom git commit hash an die Version gehangen. + +### Release Branch +Ist nur die Version aus der pom.xml + +### Feature Branch +In einem feature Branch wird der Branchname an die Version gehangen. \ No newline at end of file -- GitLab