Skip to content

Commit

Permalink
Inject global.* values to make them available to release manager
Browse files Browse the repository at this point in the history
  • Loading branch information
serverhorror committed Feb 20, 2024
1 parent 4176db2 commit 7b3d7fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

* Fix Tailor deployment drifts for D, Q envs ([#1055](https://github.com/opendevstack/ods-jenkins-shared-library/pull/1055))
* Fix Globally injected variables do not work in subcharts/dependencies ([#1066](https://github.com/opendevstack/ods-jenkins-shared-library/issues/1066))

## [4.3.4] - 2024-02-20

Expand Down
12 changes: 12 additions & 0 deletions src/org/ods/component/HelmDeploymentStrategy.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,21 @@ class HelmDeploymentStrategy extends AbstractDeploymentStrategy {
// we persist the original ones set from outside - here we just add ours
Map mergedHelmValues = [:]
mergedHelmValues << options.helmValues

// we add the global ones - this allows usage in subcharts
// TODO: is this really needed? - we could use *just* the global ones
// TODO: how do we know we are not overriding something the user defined?
options.helmValues.each { key, value ->
mergedHelmValues["global.${key}"] = value
}

mergedHelmValues['imageNamespace'] = targetProject
mergedHelmValues['imageTag'] = options.imageTag

// we also add the predefined ones as these are in use by the library
mergedHelmValues['global.imageNamespace'] = targetProject
mergedHelmValues['global.imageTag'] = options.imageTag

// deal with dynamic value files - which are env dependent
def mergedHelmValuesFiles = []
mergedHelmValuesFiles.addAll(options.helmValuesFiles)
Expand Down

0 comments on commit 7b3d7fa

Please sign in to comment.