Improve support for Extended Choice Parameters
Adds support for extended choice parameters with regards to default groovy scripts. Change-Id: I9d2a61013f041e7b81a80b5618781dbefeace329 Story: #2001931 Task: #14461
This commit is contained in:
parent
f498ef4b2e
commit
f37444423b
|
@ -398,6 +398,14 @@ def extended_choice_param(registry, xml_parent, data):
|
|||
:arg str groovy-script: the groovy script contents (optional, default ',')
|
||||
:arg str classpath: the classpath for the groovy script
|
||||
(optional, default ',')
|
||||
:arg str default-groovy-script: the default groovy
|
||||
script contents (optional, default '')
|
||||
:arg str default-groovy-classpath: the default classpath for the
|
||||
groovy script (optional, default '')
|
||||
:arg str description-groovy-script: location of groovy script when value
|
||||
description needs to come from a groovy script (optional, default '')
|
||||
:arg str description-groovy-classpath: classpath for the value description
|
||||
groovy script (optional, default '')
|
||||
|
||||
|
||||
Minimal Example:
|
||||
|
@ -443,6 +451,10 @@ def extended_choice_param(registry, xml_parent, data):
|
|||
('description-property-key', 'descriptionPropertyKey', ''),
|
||||
('groovy-script', 'groovyScript', ''),
|
||||
('classpath', 'groovyClasspath', ''),
|
||||
('default-groovy-script', 'defaultGroovyScript', ''),
|
||||
('default-groovy-classpath', 'defaultGroovyClasspath', ''),
|
||||
('description-groovy-script', 'descriptionGroovyScript', ''),
|
||||
('description-groovy-classpath', 'descriptionGroovyClasspath', ''),
|
||||
]
|
||||
convert_mapping_to_xml(pdef, data, mapping, fail_required=True)
|
||||
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
<descriptionPropertyKey/>
|
||||
<groovyScript/>
|
||||
<groovyClasspath/>
|
||||
<defaultGroovyScript/>
|
||||
<defaultGroovyClasspath/>
|
||||
<descriptionGroovyScript/>
|
||||
<descriptionGroovyClasspath/>
|
||||
</com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
|
||||
<com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
|
||||
<name>OPTIONS_CHECKBOX</name>
|
||||
|
@ -40,6 +44,10 @@
|
|||
<descriptionPropertyKey/>
|
||||
<groovyScript/>
|
||||
<groovyClasspath/>
|
||||
<defaultGroovyScript/>
|
||||
<defaultGroovyClasspath/>
|
||||
<descriptionGroovyScript/>
|
||||
<descriptionGroovyClasspath/>
|
||||
</com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
|
||||
<com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
|
||||
<name>MULTISELECTOPTIONS</name>
|
||||
|
@ -59,6 +67,10 @@
|
|||
<descriptionPropertyKey/>
|
||||
<groovyScript/>
|
||||
<groovyClasspath/>
|
||||
<defaultGroovyScript/>
|
||||
<defaultGroovyClasspath/>
|
||||
<descriptionGroovyScript/>
|
||||
<descriptionGroovyClasspath/>
|
||||
</com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
|
||||
</parameterDefinitions>
|
||||
</hudson.model.ParametersDefinitionProperty>
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
<descriptionPropertyKey/>
|
||||
<groovyScript>return 'value1, value2, value3'</groovyScript>
|
||||
<groovyClasspath/>
|
||||
<defaultGroovyScript/>
|
||||
<defaultGroovyClasspath/>
|
||||
<descriptionGroovyScript/>
|
||||
<descriptionGroovyClasspath/>
|
||||
</com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
|
||||
</parameterDefinitions>
|
||||
</hudson.model.ParametersDefinitionProperty>
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
<descriptionPropertyKey/>
|
||||
<groovyScript/>
|
||||
<groovyClasspath/>
|
||||
<defaultGroovyScript/>
|
||||
<defaultGroovyClasspath/>
|
||||
<descriptionGroovyScript/>
|
||||
<descriptionGroovyClasspath/>
|
||||
</com.cwctravel.hudson.plugins.extended__choice__parameter.ExtendedChoiceParameterDefinition>
|
||||
</parameterDefinitions>
|
||||
</hudson.model.ParametersDefinitionProperty>
|
||||
|
|
Loading…
Reference in New Issue