-
New Feature
-
Resolution: Fixed
-
Minor
-
None
I would like to build totally dynamic parameters by reading an XML file (see attachment).
My idea is that there could be a pre-parameter Groovy script, which can build parameters for the Active Choices plugin. It would have to call the plugin's API to do that, but other than that everything would be free-form.
The idea is also, that when configuring the job, the Active Choices parameters would be shown as if they were created manually - that means that the name, the description etc. would be pre-filled, as it was configured by the Groovy script.
It would make sense if the parameters can't be edited, but they can be moved around.
Please, help me understand this correctly. Are you trying to build parameters for a Jenkins job dynamically from the xml configuring them manually in a Jenkins job UI?
In other words, will the pre-parameter Groovy script write the config.xml for the job and correctly configure active choice parameters? Kind like a DSL for active choices?
If that's not what you mean and simply want to create Active-Choice option values from the XML file, then this is easy. You just need to write a groovy script to parse the XML and return a list of the XML elements that you want to display in your UI. The same XML file can be used to provide different option values and Active Choice parameters can help you display these values in different ways on the build UI, check boxes drop down lists etc.