mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-02-05 13:25:19 +02:00
Introduce dedicated factory method for configuration helper
This commit is contained in:
parent
8db2aaf5f0
commit
f47d540aa3
@ -11,11 +11,15 @@ class ConfigurationHelper implements Serializable {
|
||||
private Script script
|
||||
private String name
|
||||
|
||||
ConfigurationHelper(Script step, Map config = [:]){
|
||||
static ConfigurationHelper newInstance(Script step, Map config = [:]) {
|
||||
new ConfigurationHelper(step, config)
|
||||
}
|
||||
|
||||
private ConfigurationHelper(Script step, Map config){
|
||||
this.config = config ?: [:]
|
||||
this.script = step
|
||||
name = step.STEP_NAME
|
||||
if(!name) throw new IllegalArgumentException('Step has no public name property!')
|
||||
this.name = step.STEP_NAME
|
||||
if(!this.name) throw new IllegalArgumentException('Step has no public name property!')
|
||||
}
|
||||
|
||||
private final ConfigurationHelper initDefaults(){
|
||||
|
@ -36,7 +36,7 @@ class ConfigurationHelperTest {
|
||||
|
||||
@Test
|
||||
void testGetProperty() {
|
||||
def configuration = new ConfigurationHelper(mockScript, getConfiguration())
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, getConfiguration())
|
||||
Assert.assertEquals('maven:3.2-jdk-8-onbuild', configuration.getConfigProperty('dockerImage'))
|
||||
Assert.assertEquals('maven:3.2-jdk-8-onbuild', configuration.getConfigProperty('dockerImage', 'default'))
|
||||
Assert.assertEquals('default', configuration.getConfigProperty('something', 'default'))
|
||||
@ -46,55 +46,55 @@ class ConfigurationHelperTest {
|
||||
|
||||
@Test
|
||||
void testGetPropertyNestedLeafNodeIsString() {
|
||||
def configuration = new ConfigurationHelper(mockScript, [a:[b: 'c']])
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, [a:[b: 'c']])
|
||||
assertThat(configuration.getConfigProperty('a/b'), is('c'))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGetPropertyNestedLeafNodeIsMap() {
|
||||
def configuration = new ConfigurationHelper(mockScript, [a:[b: [c: 'd']]])
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, [a:[b: [c: 'd']]])
|
||||
assertThat(configuration.getConfigProperty('a/b'), is([c: 'd']))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGetPropertyNestedPathNotFound() {
|
||||
def configuration = new ConfigurationHelper(mockScript, [a:[b: 'c']])
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, [a:[b: 'c']])
|
||||
assertThat(configuration.getConfigProperty('a/c'), is((nullValue())))
|
||||
}
|
||||
|
||||
void testGetPropertyNestedPathStartsWithTokenizer() {
|
||||
def configuration = new ConfigurationHelper([k:'v'])
|
||||
def configuration = ConfigurationHelper.newInstance([k:'v'])
|
||||
assertThat(configuration.getConfigProperty('/k'), is(('v')))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGetPropertyNestedPathEndsWithTokenizer() {
|
||||
def configuration = new ConfigurationHelper(mockScript, [k:'v'])
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, [k:'v'])
|
||||
assertThat(configuration.getConfigProperty('k/'), is(('v')))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGetPropertyNestedPathManyTokenizer() {
|
||||
def configuration = new ConfigurationHelper(mockScript, [k1:[k2 : 'v']])
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, [k1:[k2 : 'v']])
|
||||
assertThat(configuration.getConfigProperty('///k1/////k2///'), is(('v')))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testIsPropertyDefined() {
|
||||
def configuration = new ConfigurationHelper(mockScript, getConfiguration())
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, getConfiguration())
|
||||
Assert.assertTrue(configuration.isPropertyDefined('dockerImage'))
|
||||
Assert.assertFalse(configuration.isPropertyDefined('something'))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testIsPropertyDefinedWithInteger() {
|
||||
def configuration = new ConfigurationHelper(mockScript, [dockerImage: 3])
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, [dockerImage: 3])
|
||||
Assert.assertTrue(configuration.isPropertyDefined('dockerImage'))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGetMandatoryProperty() {
|
||||
def configuration = new ConfigurationHelper(mockScript, getConfiguration())
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, getConfiguration())
|
||||
Assert.assertEquals('maven:3.2-jdk-8-onbuild', configuration.getMandatoryProperty('dockerImage'))
|
||||
Assert.assertEquals('default', configuration.getMandatoryProperty('something', 'default'))
|
||||
|
||||
@ -103,14 +103,14 @@ class ConfigurationHelperTest {
|
||||
|
||||
@Test
|
||||
void testConfigurationLoaderWithDefaults() {
|
||||
Map config = new ConfigurationHelper(mockScript, [property1: '27']).use()
|
||||
Map config = ConfigurationHelper.newInstance(mockScript, [property1: '27']).use()
|
||||
// asserts
|
||||
Assert.assertThat(config, hasEntry('property1', '27'))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testConfigurationLoaderWithCustomSettings() {
|
||||
Map config = new ConfigurationHelper(mockScript, [property1: '27'])
|
||||
Map config = ConfigurationHelper.newInstance(mockScript, [property1: '27'])
|
||||
.mixin([property1: '41'])
|
||||
.use()
|
||||
// asserts
|
||||
@ -120,7 +120,7 @@ class ConfigurationHelperTest {
|
||||
@Test
|
||||
void testConfigurationLoaderWithFilteredCustomSettings() {
|
||||
Set filter = ['property2']
|
||||
Map config = new ConfigurationHelper(mockScript, [property1: '27'])
|
||||
Map config = ConfigurationHelper.newInstance(mockScript, [property1: '27'])
|
||||
.mixin([property1: '41', property2: '28', property3: '29'], filter)
|
||||
.use()
|
||||
// asserts
|
||||
@ -131,7 +131,7 @@ class ConfigurationHelperTest {
|
||||
|
||||
@Test
|
||||
void testConfigurationLoaderWithBooleanValue() {
|
||||
Map config = new ConfigurationHelper(mockScript, [property1: '27'])
|
||||
Map config = ConfigurationHelper.newInstance(mockScript, [property1: '27'])
|
||||
.mixin([property1: false])
|
||||
.mixin([property2: false])
|
||||
.use()
|
||||
@ -142,7 +142,7 @@ class ConfigurationHelperTest {
|
||||
|
||||
@Test
|
||||
void testConfigurationLoaderWithMixinDependent() {
|
||||
Map config = new ConfigurationHelper(mockScript, [
|
||||
Map config = ConfigurationHelper.newInstance(mockScript, [
|
||||
type: 'maven',
|
||||
maven: [dockerImage: 'mavenImage', dockerWorkspace: 'mavenWorkspace'],
|
||||
npm: [dockerImage: 'npmImage', dockerWorkspace: 'npmWorkspace', executeDocker: true, executeDocker3: false],
|
||||
@ -172,7 +172,7 @@ class ConfigurationHelperTest {
|
||||
|
||||
@Test
|
||||
void testHandleCompatibility() {
|
||||
def configuration = new ConfigurationHelper(mockScript)
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript)
|
||||
.mixin([old1: 'oldValue1', old2: 'oldValue2', test: 'testValue'], null, [newStructure: [new1: 'old1', new2: 'old2']])
|
||||
.use()
|
||||
|
||||
@ -183,7 +183,7 @@ class ConfigurationHelperTest {
|
||||
|
||||
@Test
|
||||
void testHandleCompatibilityFlat() {
|
||||
def configuration = new ConfigurationHelper(mockScript)
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript)
|
||||
.mixin([old1: 'oldValue1', old2: 'oldValue2', test: 'testValue'], null, [new1: 'old1', new2: 'old2'])
|
||||
.use()
|
||||
|
||||
@ -194,7 +194,7 @@ class ConfigurationHelperTest {
|
||||
|
||||
@Test
|
||||
void testHandleCompatibilityDeep() {
|
||||
def configuration = new ConfigurationHelper(mockScript)
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript)
|
||||
.mixin([old1: 'oldValue1', old2: 'oldValue2', test: 'testValue'], null, [deep:[deeper:[newStructure: [new1: 'old1', new2: 'old2']]]])
|
||||
.use()
|
||||
|
||||
@ -205,7 +205,7 @@ class ConfigurationHelperTest {
|
||||
|
||||
@Test
|
||||
void testHandleCompatibilityNewAvailable() {
|
||||
def configuration = new ConfigurationHelper(mockScript, [old1: 'oldValue1', newStructure: [new1: 'newValue1'], test: 'testValue'])
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, [old1: 'oldValue1', newStructure: [new1: 'newValue1'], test: 'testValue'])
|
||||
.mixin([old1: 'oldValue1', newStructure: [new1: 'newValue1'], test: 'testValue'], null, [newStructure: [new1: 'old1', new2: 'old2']])
|
||||
.use()
|
||||
|
||||
@ -215,7 +215,7 @@ class ConfigurationHelperTest {
|
||||
|
||||
@Test
|
||||
void testHandleCompatibilityOldNotSet() {
|
||||
def configuration = new ConfigurationHelper(mockScript, [old1: null, test: 'testValue'])
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, [old1: null, test: 'testValue'])
|
||||
.mixin([old1: null, test: 'testValue'], null, [newStructure: [new1: 'old1', new2: 'old2']])
|
||||
.use()
|
||||
|
||||
@ -225,7 +225,7 @@ class ConfigurationHelperTest {
|
||||
|
||||
@Test
|
||||
void testHandleCompatibilityNoneAvailable() {
|
||||
def configuration = new ConfigurationHelper(mockScript, [old1: null, test: 'testValue'])
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, [old1: null, test: 'testValue'])
|
||||
.mixin([test: 'testValue'], null, [newStructure: [new1: 'old1', new2: 'old2']])
|
||||
.use()
|
||||
|
||||
@ -239,7 +239,7 @@ class ConfigurationHelperTest {
|
||||
thrown.expect(IllegalArgumentException)
|
||||
thrown.expectMessage('ERROR - NO VALUE AVAILABLE FOR myKey')
|
||||
|
||||
new ConfigurationHelper(mockScript).withMandatoryProperty('myKey')
|
||||
ConfigurationHelper.newInstance(mockScript).withMandatoryProperty('myKey')
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -248,22 +248,22 @@ class ConfigurationHelperTest {
|
||||
thrown.expect(IllegalArgumentException)
|
||||
thrown.expectMessage('My error message')
|
||||
|
||||
new ConfigurationHelper(mockScript).withMandatoryProperty('myKey', 'My error message')
|
||||
ConfigurationHelper.newInstance(mockScript).withMandatoryProperty('myKey', 'My error message')
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithMandoryParameterDefaultCustomFailureMessageProvidedSucceeds() {
|
||||
new ConfigurationHelper(mockScript, [myKey: 'myValue']).withMandatoryProperty('myKey', 'My error message')
|
||||
ConfigurationHelper.newInstance(mockScript, [myKey: 'myValue']).withMandatoryProperty('myKey', 'My error message')
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithMandoryParameterDefaultCustomFailureMessageNotProvidedSucceeds() {
|
||||
new ConfigurationHelper(mockScript, [myKey: 'myValue']).withMandatoryProperty('myKey')
|
||||
ConfigurationHelper.newInstance(mockScript, [myKey: 'myValue']).withMandatoryProperty('myKey')
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithMandoryWithFalseCondition() {
|
||||
new ConfigurationHelper(mockScript, [verify: false])
|
||||
ConfigurationHelper.newInstance(mockScript, [verify: false])
|
||||
.withMandatoryProperty('missingKey', null, { c -> return c.get('verify') })
|
||||
}
|
||||
|
||||
@ -272,20 +272,20 @@ class ConfigurationHelperTest {
|
||||
thrown.expect(IllegalArgumentException)
|
||||
thrown.expectMessage('ERROR - NO VALUE AVAILABLE FOR missingKey')
|
||||
|
||||
new ConfigurationHelper(mockScript, [verify: true])
|
||||
ConfigurationHelper.newInstance(mockScript, [verify: true])
|
||||
.withMandatoryProperty('missingKey', null, { c -> return c.get('verify') })
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithMandoryWithTrueConditionExistingValue() {
|
||||
new ConfigurationHelper(mockScript, [existingKey: 'anyValue', verify: true])
|
||||
ConfigurationHelper.newInstance(mockScript, [existingKey: 'anyValue', verify: true])
|
||||
.withMandatoryProperty('existingKey', null, { c -> return c.get('verify') })
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTelemetryConfigurationAvailable() {
|
||||
Set filter = ['test']
|
||||
def configuration = new ConfigurationHelper(mockScript, [test: 'testValue'])
|
||||
def configuration = ConfigurationHelper.newInstance(mockScript, [test: 'testValue'])
|
||||
.mixin([collectTelemetryData: false], filter)
|
||||
.use()
|
||||
|
||||
|
@ -41,7 +41,7 @@ def call(Map parameters = [:], Closure body = null) {
|
||||
script = this
|
||||
|
||||
// load default & individual configuration
|
||||
ConfigurationHelper configHelper = new ConfigurationHelper(this)
|
||||
ConfigurationHelper configHelper = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS, CONFIG_KEY_COMPATIBILITY)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS, CONFIG_KEY_COMPATIBILITY)
|
||||
|
@ -26,7 +26,7 @@ def call(Map parameters = [:]) {
|
||||
def utils = parameters.juStabUtils ?: new Utils()
|
||||
def script = parameters.script ?: [commonPipelineEnvironment: commonPipelineEnvironment]
|
||||
|
||||
Map config = new ConfigurationHelper(this)
|
||||
Map config = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -29,7 +29,7 @@ def call(parameters = [:]) {
|
||||
|
||||
ChangeManagement cm = parameters?.cmUtils ?: new ChangeManagement(script, gitUtils)
|
||||
|
||||
ConfigurationHelper configHelper = new ConfigurationHelper(this)
|
||||
ConfigurationHelper configHelper = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, generalConfigurationKeys)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, stepConfigurationKeys)
|
||||
|
@ -30,7 +30,7 @@ def call(Map parameters = [:]) {
|
||||
prepare(parameters)
|
||||
|
||||
// load default & individual configuration
|
||||
Map configuration = new ConfigurationHelper(this)
|
||||
Map configuration = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -33,7 +33,7 @@ def call(Map parameters = [:]) {
|
||||
if (script == null)
|
||||
script = [commonPipelineEnvironment: commonPipelineEnvironment]
|
||||
|
||||
Map config = new ConfigurationHelper(this)
|
||||
Map config = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS, CONFIG_KEY_COMPATIBILITY)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS, CONFIG_KEY_COMPATIBILITY)
|
||||
|
@ -21,7 +21,7 @@ void call(Map parameters = [:], body) {
|
||||
final script = parameters.script
|
||||
if (script == null)
|
||||
script = [commonPipelineEnvironment: commonPipelineEnvironment]
|
||||
Map config = new ConfigurationHelper(this)
|
||||
Map config = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -22,7 +22,7 @@ void call(Map parameters = [:], body) {
|
||||
if (script == null)
|
||||
script = [commonPipelineEnvironment: commonPipelineEnvironment]
|
||||
|
||||
ConfigurationHelper configHelper = new ConfigurationHelper(this)
|
||||
ConfigurationHelper configHelper = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -24,7 +24,7 @@ def call(Map parameters = [:]) {
|
||||
script = [commonPipelineEnvironment: commonPipelineEnvironment]
|
||||
|
||||
// load default & individual configuration
|
||||
Map configuration = new ConfigurationHelper(this)
|
||||
Map configuration = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -26,7 +26,7 @@ def call(Map parameters = [:]) {
|
||||
final script = parameters.script
|
||||
|
||||
// load default & individual configuration
|
||||
Map configuration = new ConfigurationHelper(this)
|
||||
Map configuration = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -25,7 +25,7 @@ def call(Map parameters = [:]) {
|
||||
final script = parameters?.script ?: [commonPipelineEnvironment: commonPipelineEnvironment]
|
||||
|
||||
// load default & individual configuration
|
||||
Map configuration = new ConfigurationHelper(this)
|
||||
Map configuration = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -72,7 +72,7 @@ def call(parameters = [:]) {
|
||||
// Backward compatibility end
|
||||
|
||||
// load default & individual configuration
|
||||
Map configuration = new ConfigurationHelper(this)
|
||||
Map configuration = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
|
||||
.mixin(stepCompatibilityConfiguration)
|
||||
|
@ -25,7 +25,7 @@ def call(Map parameters = [:]) {
|
||||
def utils = parameters?.juStabUtils ?: new Utils()
|
||||
|
||||
// load default & individual configuration
|
||||
Map config = new ConfigurationHelper(this)
|
||||
Map config = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -20,7 +20,7 @@ def call(Map parameters = [:]) {
|
||||
//additional includes via passing e.g. stashIncludes: [opa5: '**/*.include']
|
||||
//additional excludes via passing e.g. stashExcludes: [opa5: '**/*.exclude']
|
||||
|
||||
Map config = new ConfigurationHelper(this)
|
||||
Map config = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -22,7 +22,7 @@ def call(Map parameters = [:]) {
|
||||
//additional includes via passing e.g. stashIncludes: [opa5: '**/*.include']
|
||||
//additional excludes via passing e.g. stashExcludes: [opa5: '**/*.exclude']
|
||||
|
||||
Map config = new ConfigurationHelper(this)
|
||||
Map config = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -17,7 +17,7 @@ def call(Map parameters = [:]) {
|
||||
|
||||
loadConfigurationFromFile(script, configFile)
|
||||
|
||||
Map config = new ConfigurationHelper(this)
|
||||
Map config = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
|
||||
.use()
|
||||
|
@ -24,7 +24,7 @@ def call(Map parameters = [:]) {
|
||||
def utils = parameters.juStabUtils ?: new Utils()
|
||||
def script = parameters.script ?: [commonPipelineEnvironment: commonPipelineEnvironment]
|
||||
|
||||
Map config = new ConfigurationHelper(this)
|
||||
Map config = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -28,7 +28,7 @@ def call(Map parameters = [:]) {
|
||||
prepare(parameters)
|
||||
|
||||
// load default & individual configuration
|
||||
Map configuration = new ConfigurationHelper(this)
|
||||
Map configuration = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
|
||||
|
@ -29,7 +29,7 @@ def call(parameters = [:]) {
|
||||
|
||||
ChangeManagement cm = parameters.cmUtils ?: new ChangeManagement(script)
|
||||
|
||||
ConfigurationHelper configHelper = new ConfigurationHelper(this)
|
||||
ConfigurationHelper configHelper = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, generalConfigurationKeys)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, stepConfigurationKeys)
|
||||
|
@ -31,7 +31,7 @@ def call(parameters = [:]) {
|
||||
|
||||
ChangeManagement cm = parameters.cmUtils ?: new ChangeManagement(script)
|
||||
|
||||
ConfigurationHelper configHelper = new ConfigurationHelper(this)
|
||||
ConfigurationHelper configHelper = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, generalConfigurationKeys)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, stepConfigurationKeys)
|
||||
|
@ -33,7 +33,7 @@ def call(parameters = [:]) {
|
||||
|
||||
ChangeManagement cm = parameters.cmUtils ?: new ChangeManagement(script)
|
||||
|
||||
ConfigurationHelper configHelper = new ConfigurationHelper(this)
|
||||
ConfigurationHelper configHelper = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, generalConfigurationKeys)
|
||||
.mixinStepConfig(script.commonPipelineEnvironment, stepConfigurationKeys)
|
||||
|
Loading…
x
Reference in New Issue
Block a user