Hi
I try use the new extended-choice-parameter-plugin using JSON Parameter Config Groovy Script File it work fantastic
And I try to move more parameters to the new function for a better GUI.
I use also the Active Choices Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Active+Choices+Plugin) to set interactively a choices list that depend on a select of another choices list.
For example I have one choices list ( region ) with ["us_west","us_east","europe"],
Depend on the selected region I run the script in Active Choices Plugin
def list = []
if (binding.variables.get('region') != null) {
switch ( binding.variables.get('region') ) {
case "europe":
list = ['w_1', 'r_1', 'r_2']
break
case "us_east":
list = ['p_2', 'p_1']
break
case "us_west":
list = ['d_1']
break
default:
return []
}
} else {
return []
}
List
To set the choices list (availability_zone ) in the Active Choices Reactive parameter.
This is my json
Can you please help me to set the json .
"items": {
"type": "object",
"id": "arr_region",
properties: {
region: {
"type": "string",
"enum": ["us_west","us_east","europe"]
},
az_us_east: {
"type": "string",
"options": {
"collapsed": true
},
"enum": ["p_1","p_2"]
},
az_europe: {
"type": "string",
"options": {
"collapsed": true
},
"enum": [“w_1”, “r_1”, “r_2”]
},
az_us_west: {
"type": "string",
"options": {
"collapsed": true
},
"enum": ["d_1"]
},
availability_zone: {
"type": "string",
"watch": {
"fregion": "arr_region.region",
"faz_europe": "arr_region.az_europe",
"faz_us_east": "arr_region.az_us_east",
"faz_us_west": "arr_region.az_us_west",
},
"enumSource": "fregion”
}
Can you please help me to set it correctly .
Is it possible to set also a password parameters in Jason schema
Thank and regards zacky