diff --git a/pkg/config/config.go b/pkg/config/config.go index c031b70fd0..ddfaf50c4e 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -72,6 +72,10 @@ func (c *Config) ApplyAliasConfig(parameters []StepParameters, secrets []StepSec if c.Steps[stepName] != nil { c.Steps[stepName] = setParamValueFromAlias(stepName, c.Steps[stepName], filters.Steps, p.Name, p.Aliases) } + if centralBuild, ok := c.Stages["Central Build"]; ok { + c.Stages["Build"] = centralBuild + delete(c.Stages, "Central Build") + } } for _, s := range secrets { c.General = setParamValueFromAlias(stepName, c.General, filters.General, s.Name, s.Aliases) @@ -81,6 +85,10 @@ func (c *Config) ApplyAliasConfig(parameters []StepParameters, secrets []StepSec if c.Steps[stepName] != nil { c.Steps[stepName] = setParamValueFromAlias(stepName, c.Steps[stepName], filters.Steps, s.Name, s.Aliases) } + if centralBuild, ok := c.Stages["Central Build"]; ok { + c.Stages["Build"] = centralBuild + delete(c.Stages, "Central Build") + } } } @@ -185,6 +193,9 @@ func (c *Config) GetStepConfig(flagValues map[string]interface{}, paramJSON stri } c.ApplyAliasConfig(parameters, secrets, filters, stageName, stepName, stepAliases) + if stageName == "Central Build" { + stageName = "Build" + } // initialize with defaults from step.yaml stepConfig.mixInStepDefaults(parameters) diff --git a/vars/commonPipelineEnvironment.groovy b/vars/commonPipelineEnvironment.groovy index b44842d9ca..90e3a871d3 100644 --- a/vars/commonPipelineEnvironment.groovy +++ b/vars/commonPipelineEnvironment.groovy @@ -192,6 +192,9 @@ class commonPipelineEnvironment implements Serializable { Map getStepConfiguration(stepName, stageName = env.STAGE_NAME, includeDefaults = true) { Map defaults = [:] + if (stageName == 'Central Build') { + stageName = 'Build' + } if (includeDefaults) { defaults = ConfigurationLoader.defaultGeneralConfiguration() defaults = ConfigurationMerger.merge(ConfigurationLoader.defaultStepConfiguration(null, stepName), null, defaults)