1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00

add field GENERAL_CONFIG_KEYS to artifactSetVersion step

This commit is contained in:
Marcus Holl 2018-10-25 14:11:11 +02:00
parent fad3191de1
commit 75ae0e5f03

View File

@ -8,6 +8,9 @@ import groovy.text.SimpleTemplateEngine
@Field String STEP_NAME = 'artifactSetVersion' @Field String STEP_NAME = 'artifactSetVersion'
@Field Map CONFIG_KEY_COMPATIBILITY = [gitSshKeyCredentialsId: 'gitCredentialsId'] @Field Map CONFIG_KEY_COMPATIBILITY = [gitSshKeyCredentialsId: 'gitCredentialsId']
@Field Set GENERAL_CONFIG_KEYS = STEP_CONFIG_KEYS
@Field Set STEP_CONFIG_KEYS = [ @Field Set STEP_CONFIG_KEYS = [
'artifactType', 'artifactType',
'buildTool', 'buildTool',
@ -23,6 +26,7 @@ import groovy.text.SimpleTemplateEngine
'timestampTemplate', 'timestampTemplate',
'versioningTemplate' 'versioningTemplate'
] ]
@Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS.plus('gitCommitId') @Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS.plus('gitCommitId')
void call(Map parameters = [:], Closure body = null) { void call(Map parameters = [:], Closure body = null) {
@ -43,7 +47,7 @@ void call(Map parameters = [:], Closure body = null) {
// load default & individual configuration // load default & individual configuration
ConfigurationHelper configHelper = ConfigurationHelper.newInstance(this) ConfigurationHelper configHelper = ConfigurationHelper.newInstance(this)
.loadStepDefaults() .loadStepDefaults()
.mixinGeneralConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS, CONFIG_KEY_COMPATIBILITY) .mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS, CONFIG_KEY_COMPATIBILITY)
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS, CONFIG_KEY_COMPATIBILITY) .mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS, CONFIG_KEY_COMPATIBILITY)
.mixinStageConfig(script.commonPipelineEnvironment, parameters.stageName?:env.STAGE_NAME, STEP_CONFIG_KEYS, CONFIG_KEY_COMPATIBILITY) .mixinStageConfig(script.commonPipelineEnvironment, parameters.stageName?:env.STAGE_NAME, STEP_CONFIG_KEYS, CONFIG_KEY_COMPATIBILITY)
.mixin(gitCommitId: gitUtils.getGitCommitIdOrNull()) .mixin(gitCommitId: gitUtils.getGitCommitIdOrNull())