Hi,

I am trying to pass JSON parameter POST to my  HTTPS URL. I am not able to 
configure groovy scripti in Extend Choice Parameter as I am new to Groovy. 
Can you please share your groovy script and help me with JSON configuration 
in  Extend Choice Parameter plugin.

Thanks,
Aryan Sharma

On Tuesday, November 3, 2015 at 4:48:28 PM UTC+1, zacky azoulay wrote:
>
> 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
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0bcf80a8-688f-4b69-a7cb-5861b086a698%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to