mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-18 05:18:24 +02:00
fix(config): consider defaults with higher prio than env (#2725)
* fix(config): properly handle empty values from cpe * fix(config): consider defaults with higher prio than env
This commit is contained in:
parent
d15b67f882
commit
24cb3c92e1
@ -179,6 +179,9 @@ func (c *Config) GetStepConfig(flagValues map[string]interface{}, paramJSON stri
|
||||
// initialize with defaults from step.yaml
|
||||
stepConfig.mixInStepDefaults(parameters)
|
||||
|
||||
// merge parameters provided by Piper environment
|
||||
stepConfig.mixIn(envParameters, filters.All)
|
||||
|
||||
// read defaults & merge general -> steps (-> general -> steps ...)
|
||||
for _, def := range c.defaults.Defaults {
|
||||
def.ApplyAliasConfig(parameters, secrets, filters, stageName, stepName, stepAliases)
|
||||
@ -193,9 +196,6 @@ func (c *Config) GetStepConfig(flagValues map[string]interface{}, paramJSON stri
|
||||
}
|
||||
}
|
||||
|
||||
// merge parameters provided by Piper environment
|
||||
stepConfig.mixIn(envParameters, filters.All)
|
||||
|
||||
// read config & merge - general -> steps -> stages
|
||||
stepConfig.mixIn(c.General, filters.General)
|
||||
stepConfig.mixIn(c.Steps[stepName], filters.Steps)
|
||||
|
Loading…
x
Reference in New Issue
Block a user