mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Mark widely used method of ConfigurationHelper as API
Just as basis for a discussion. Before merging we should check if there is any need to adjust the methods first before declaring it as API so that they should remain stable.
This commit is contained in:
parent
a678429f42
commit
6e0faa37ce
@ -31,16 +31,19 @@ class ConfigurationHelper implements Serializable {
|
||||
return this
|
||||
}
|
||||
|
||||
@API
|
||||
ConfigurationHelper mixinGeneralConfig(commonPipelineEnvironment, Set filter = null, Map compatibleParameters = [:]){
|
||||
Map stepConfiguration = ConfigurationLoader.generalConfiguration([commonPipelineEnvironment: commonPipelineEnvironment])
|
||||
return mixin(stepConfiguration, filter, compatibleParameters)
|
||||
}
|
||||
|
||||
@API
|
||||
ConfigurationHelper mixinStageConfig(commonPipelineEnvironment, stageName, Set filter = null, Map compatibleParameters = [:]){
|
||||
Map stageConfiguration = ConfigurationLoader.stageConfiguration([commonPipelineEnvironment: commonPipelineEnvironment], stageName)
|
||||
return mixin(stageConfiguration, filter, compatibleParameters)
|
||||
}
|
||||
|
||||
@API
|
||||
ConfigurationHelper mixinStepConfig(commonPipelineEnvironment, Set filter = null, Map compatibleParameters = [:]){
|
||||
Map stepConfiguration = ConfigurationLoader.stepConfiguration([commonPipelineEnvironment: commonPipelineEnvironment], name)
|
||||
return mixin(stepConfiguration, filter, compatibleParameters)
|
||||
@ -100,6 +103,7 @@ class ConfigurationHelper implements Serializable {
|
||||
return this
|
||||
}
|
||||
|
||||
@API
|
||||
@NonCPS // required because we have a closure in the
|
||||
// method body that cannot be CPS transformed
|
||||
Map use(){
|
||||
@ -148,6 +152,7 @@ class ConfigurationHelper implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
@API
|
||||
ConfigurationHelper withMandatoryProperty(key, errorMessage = null, condition = null){
|
||||
if(condition){
|
||||
if(condition(this.config))
|
||||
|
Loading…
Reference in New Issue
Block a user