From 0c490194903feffbc1cc0b9dd712aa306f7fbb8b Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 17 Mar 2025 11:38:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8(helm)=20fix=20helmfile=20lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Latest release of helmfile is applying the change related before as a warning. Environnements must be before releases but not in the same document of repositories. --- .github/workflows/helmfile-linter.yaml | 6 +++--- CHANGELOG.md | 1 + src/helm/helmfile.yaml | 13 +++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/helmfile-linter.yaml b/.github/workflows/helmfile-linter.yaml index af5fb7c4..6743df99 100644 --- a/.github/workflows/helmfile-linter.yaml +++ b/.github/workflows/helmfile-linter.yaml @@ -11,7 +11,7 @@ jobs: helmfile-lint: runs-on: ubuntu-latest container: - image: ghcr.io/helmfile/helmfile:latest + image: ghcr.io/helmfile/helmfile:v0.171.0 steps: - name: Checkout repository @@ -22,9 +22,9 @@ jobs: run: | set -e HELMFILE=src/helm/helmfile.yaml - environments=$(awk '/environments:/ {flag=1; next} flag && NF {print} !NF {flag=0}' "$HELMFILE" | grep -E '^[[:space:]]{2}[a-zA-Z]+' | sed 's/^[[:space:]]*//;s/:.*//') + environments=$(awk 'BEGIN {in_env=0} /^environments:/ {in_env=1; next} /^---/ {in_env=0} in_env && /^ [^ ]/ {gsub(/^ /,""); gsub(/:.*$/,""); print}' "$HELMFILE") for env in $environments; do echo "################### $env lint ###################" helmfile -e $env -f $HELMFILE lint || exit 1 echo -e "\n" - done + done \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3024cc9e..9a82e569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to - 🐛(backend) refactor to fix filtering on children and descendants views #695 - 🐛(action) fix notify-argocd workflow #713 +- 🚨(helm) fix helmfile lint #736 ## [2.4.0] - 2025-03-06 diff --git a/src/helm/helmfile.yaml b/src/helm/helmfile.yaml index 3ca3a081..53079011 100644 --- a/src/helm/helmfile.yaml +++ b/src/helm/helmfile.yaml @@ -1,7 +1,13 @@ +environments: + dev: + values: + - version: 2.4.0 +--- repositories: - name: bitnami url: registry-1.docker.io/bitnamicharts oci: true +--- releases: - name: keycloak @@ -88,9 +94,4 @@ releases: namespace: {{ .Namespace }} chart: ./impress values: - - env.d/{{ .Environment.Name }}/values.impress.yaml.gotmpl - -environments: - dev: - values: - - version: 2.4.0 + - env.d/{{ .Environment.Name }}/values.impress.yaml.gotmpl \ No newline at end of file