1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-02-07 13:42:23 +02:00

Introduce GENERAL_COMFIG_KEYS for seleniumExecuteTests

This commit is contained in:
Marcus Holl 2018-10-25 14:01:44 +02:00
parent 0013c5db0e
commit fad3191de1

View File

@ -6,6 +6,9 @@ import groovy.transform.Field
import groovy.text.SimpleTemplateEngine
@Field String STEP_NAME = 'seleniumExecuteTests'
@Field GENERAL_CONFIG_KEYS = STEP_CONFIG_KEYS
@Field Set STEP_CONFIG_KEYS = [
'buildTool', //defines the tool which is used for executing the tests
'containerPortMappings', //port mappings required for containers. This will only take effect inside a Kubernetes pod, format [[containerPort: 1111, hostPort: 1111]]
@ -23,6 +26,7 @@ import groovy.text.SimpleTemplateEngine
'stashContent', //list of stash names which are required to be unstashed before test run
'testRepository' //if tests are in a separate repository, git url can be defined. For protected repositories the git ssh url is required
]
@Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS
void call(Map parameters = [:], Closure body) {
@ -33,7 +37,7 @@ void call(Map parameters = [:], Closure body) {
// load default & individual configuration
Map config = ConfigurationHelper.newInstance(this)
.loadStepDefaults()
.mixinGeneralConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
.mixinStepConfig(script.commonPipelineEnvironment, STEP_CONFIG_KEYS)
.mixinStageConfig(script.commonPipelineEnvironment, parameters.stageName?:env.STAGE_NAME, STEP_CONFIG_KEYS)
.mixin(parameters, PARAMETER_KEYS)