I'm running Jenkins 2.251 on Ubuntu.
I have a shell script (script.sh) that outputs a list:
$ ./script.sh
[item1,item2,item3]
In my freestyle project I've added a build step that executes script.sh, and I see the output in the build log just like the above example. I don't care if the final project is freestyle, but that worked to get me to this point.
Now, I want to use this list as the input to a Choice parameter so it creates a dropdown chooser with the items in the list. I've marked the project as parameterized and added a Choices parameter but there is no linkage between the list above and the Choices parameter. I would like to know how to use the output from script.sh as the input to the Choices dropdown.
I found a groovy example here that kinda does what I want but I don't need to rewrite the groovy code to produce the list, it's all done in script.sh:
Any help is appreciated!
Thanks,
-Kenny Cason