0

parse .ini file subsection and use combination of linux command to extract key in jenkins for dynamic choice parameter under script,groovy script and display as checkbox option to user select ?

suppose if I use dynamic choice in jenkins under groovy script section i want to populate the values from .ini file and display as option to user select.

Example : In my Jenkins Workspace ,I have config.ini file suppose the key,values are:

[section]

[section.sub1]
key1=/path/subpath/A,/path/subpath/B,/path/subpath/C

[section.sub2]
key2=/path/subpath/A1,/path/subpath/B1,/path/subpath/C1

I want to display when user select section.sub1 then all the values in jenkins before build

Populate the section.sub1 values as checkbox option to Jenkins when user select the section.sub1 same for section.sub2 values when selected

daggett
  • 26,404
  • 3
  • 40
  • 56
  • there is no native support of ini format in groovy/java. are you restricted to this configuration format or you are able to change it for example to https://en.wikipedia.org/wiki/YAML or https://en.wikipedia.org/wiki/TOML. asking because config format in your question is very close to toml but toml requires quotes for string value. – daggett Jul 03 '23 at 20:03

0 Answers0