Georgi Kamunski
Georgi Kamunski

Reputation: 51

Jenkins Extended Choice Parameter Plugin Groovy Script

So in the website for the plugin, the change-log for Version 0.61 (Mar 30, 2016) mentions that they have exposed Jenkins and project bindings for use in a groovy script. I'm currently trying to set a parameter (multi select) and i want it to have different options based on the value of another parameter which is set before this one in the Jenkins job. However i'm not able to get the value of that other parameter in the script.

My problem is very similar to the one explained here

I've tried using ${param}, $(param), $param, bindings.variables.get('param') in the script, and none of it works

I've also tried to set that parameter in the Variable bindings section of the script but still no success.

Any ideas about the correct way to obtain the value?

Upvotes: 0

Views: 2710

Answers (1)

Sunil
Sunil

Reputation: 1

I set the variable binding as param on the other field that you want to dynamically populate and used param (please note that i didnt use $ ${} or binding.get etc). It worked for me.

As a side note, Will active choice reactive parameter work in your case?

Upvotes: 0

Related Questions