0
votes

I am trying to access choice parameters set in the This build is parameterized in a Groovy build script, for a Jenkins freestyle job.

enter image description here

I tried using the List as println {params.List} but it did not work and gave following output :

enter image description here

I have referred other similar posts on Stackoverflow, but nothing seems to have worked for me. I have also tried params.List {List} List and got following error with${env.List} & ${params.List}

groovy.lang.MissingMethodException: No signature of method: Script1.$() is applicable for argument types: (Script1$_run_closure1) values: [Script1$_run_closure1@159f1360] 11:12:48 Possible solutions: is(java.lang.Object), run(), run(), any(), use([Ljava.lang.Object;), any(groovy.lang.Closure)

How should I be calling the List correctly such that it prints out the choice I selected while running build with parameters? Looking for some guidance on this. Thanks in advance.

1

1 Answers

0
votes

Passing $List from properties and using the new variable 'props_list' in script worked!

enter image description here