Skip to content

Conversation

mdroll
Copy link
Contributor

@mdroll mdroll commented Sep 26, 2025

How to Test the Fix

Notes:

  • Running GOP checkout is required
  • Testing of the fix is done with the petclinc-helm i.e.

1. Prepare the GitOps Build Lib

Fetch the fix branch from GitHub:
https://github.com/cloudogu/gitops-build-lib/tree/bugfix/helm-wrong-order-with-values-shared

Edit the remotes and push this fix branch into the Gob SCM Manager repository of gitops-build-lib.

2. Update the Petclinic Helm Repo

Open the Jenkinsfile in the petclinic-helm repo and change the Version String:
http://scmm.localhost/scm/repo/argocd/petclinic-helm/code/sources/main/Jenkinsfile/

String getGitOpsBuildLibVersion() { '0.7.0'}

to

String getGitOpsBuildLibVersion() { 'bugfix/helm-wrong-order-with-values-shared'}

Jenkins should now start building and redeploying petclinic. Wait for finishing the Jenkins Build.

3. Verify the Fix

Edit values-shared.yaml:
http://scmm.localhost/scm/repo/argocd/petclinic-helm/code/sources/main/k8s/values-shared.yaml

Add an extra environment variable:

extraEnv: |
  ...
  - name: Foo
    value: Bar

Edit values-staging.yaml:
http://scmm.localhost/scm/repo/argocd/petclinic-helm/code/sources/main/k8s/values-staging.yaml

Add another variable:

extraEnv: |
  ...
  - name: Foo
    value: Baz

4. Expected Behavior

After the container build, the environment variables should respect staging overrides:

Foo=Bar (from shared) Foo=Baz (from staging)

Additional note: Helm chart substitution use the helm template command e.g.

Wrong: helm template bla spring-boot-helm-chart-with-dependency/ -f petclinic-helm/k8s/values-staging.yaml -f petclinic-helm/k8s/values-shared.yaml Correct: helm template bla spring-boot-helm-chart-with-dependency/ -f petclinic-helm/k8s/values-shared.yaml -f petclinic-helm/

@ThomasMichael1811 ThomasMichael1811 marked this pull request as ready for review September 30, 2025 06:40
@ThomasMichael1811 ThomasMichael1811 merged commit 611feca into main Sep 30, 2025
2 checks passed
@ThomasMichael1811 ThomasMichael1811 deleted the bugfix/helm-wrong-order-with-values-shared branch September 30, 2025 06:41
@schnatterer
Copy link
Member

Fixes #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants