From 6e0faa37cedc2ce97fa0b8ab2173d3e724badb5a Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Mon, 17 Dec 2018 09:21:23 +0100 Subject: [PATCH] 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. --- src/com/sap/piper/ConfigurationHelper.groovy | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/sap/piper/ConfigurationHelper.groovy b/src/com/sap/piper/ConfigurationHelper.groovy index e8396ca04..116fa8051 100644 --- a/src/com/sap/piper/ConfigurationHelper.groovy +++ b/src/com/sap/piper/ConfigurationHelper.groovy @@ -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))