diff --git a/Jenkinsfile b/Jenkinsfile index 8e851600e5c2999479d54ff604eb7d050b488c6a..8d41e04223e5fa9d0ed9a06b663d8fc2d108aceb 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 408f1025e5ed73685b4dc3cb85fc0cebb1a59f4e..365e3e87197283fd061c56e274a7f59b47c5a51a 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 0000000000000000000000000000000000000000..06d30da3fd35dec702c4c204f85e504bbb8d3fb3 --- /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