1
0
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:
Marcus Holl 2018-12-17 09:21:23 +01:00
parent a678429f42
commit 6e0faa37ce

View File

@ -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))