How to reference the node parameter from the active choices reactive parameter

110 views
Skip to first unread message

Tim Henderson

unread,
Mar 14, 2017, 8:42:50 AM3/14/17
to Jenkins Users

I basically want to drive a set of choice parameters based on the slave node parameter choice. I tried to use the active choices reactive plugin to point to the node choice like this:

  
  if (Node.contains("name_of_slave_node")) {
    return ["you_chose_slave_node"]
  } else {
    return ["master"]
  }

Nothing I do seems to work. I can use this type of logic and point to any other type of parameter and it works. Im just a bit stumped as to where to go with this. Could it be a limitation with the plugin or am I missing something with how the groovy is addressing the node parameter. I really appreciate any advice.

marouane zhani

unread,
Aug 3, 2018, 8:19:24 AM8/3/18
to Jenkins Users
I am actually having the same problem. did you succeed to resolve it? 
Reply all
Reply to author
Forward
0 new messages