Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion vars/continuousIntegrationPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ def call(Map pipelineParams = [:]) {
sonar: [ enable: false, projectKey: null, tokenId: null, exclusions: "tests/**/*,**/*.xml,**/*.yml", testExclusions: "**/*" ],
pushArtifacts: true
]
pipelineParams = defaultParameters << pipelineParams
pipelineParams = deepMerge(defaultParameters, pipelineParams)

// Pretty print the final pipeline parameters
echo "Pipeline parameters: ${groovy.json.JsonOutput.prettyPrint(groovy.json.JsonOutput.toJson(pipelineParams))}"

stage ("Pipeline parameters check") {
// Print effective pipeline parameters for debugging
Expand Down
12 changes: 12 additions & 0 deletions vars/deepMerge.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Nested maps merger
def call(Map defaults, Map overrides) {
def result = [:] + defaults
overrides.each { k, v ->
if (result[k] instanceof Map && v instanceof Map) {
result[k] = deepMerge(result[k] as Map, v as Map)
} else {
result[k] = v
}
}
return result
}
Loading