Skip to content

Commit 31a13de

Browse files
committed
fix: add Helm chart validation to CI pipeline and fix label indentation
Add helm-lint and helm template validation jobs to PR workflow to catch chart rendering and YAML syntax errors before deployment. Prevents issues like the gitlab-ci-default.yaml indentation bug that broke ArgoCD sync. Also fixes the label indentation in gitlab-ci-default.yaml from 6 spaces to 4 spaces to align with nindent output, resolving YAML parse errors during Helm template rendering. This ensures all Helm templates are validated on every PR before merge, catching deployment issues early in the CI pipeline. Signed-off-by: Sergiy Kulanov <sergiy_kulanov@epam.com>
1 parent 4f04701 commit 31a13de

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/pr.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,22 @@ jobs:
2626

2727
- name: "run tests"
2828
run: make build && make test
29+
30+
helm-lint:
31+
name: Validate Helm chart
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
- name: Check out code
36+
uses: actions/checkout@v6
37+
38+
- name: Set up Helm
39+
uses: azure/setup-helm@v4
40+
with:
41+
version: "latest"
42+
43+
- name: Helm lint
44+
run: helm lint deploy-templates
45+
46+
- name: Helm template
47+
run: helm template test deploy-templates > /dev/null

deploy-templates/templates/gitlab/gitlab-ci-default.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ kind: ConfigMap
33
metadata:
44
name: gitlab-ci-default
55
labels:
6-
app.edp.epam.com/ci-template: gitlab
7-
{{- include "codebase-operator.labels" . | nindent 4 }}
6+
app.edp.epam.com/ci-template: gitlab
7+
{{- include "codebase-operator.labels" . | nindent 4 }}
88
data:
99
# Read by krci-portal for template selection UI; not consumed by the operator.
1010
description: |

0 commit comments

Comments
 (0)