Git – Populate ‘Multi Select’ parameter (‘Extended Choice Parameter’ plugin) in Jenkins dynamically

gitgroovyJenkins

Is there a way in Jenkins to dynamically populate 'Multi Select' parameter?

To describe my issue in detail: We use Git and i would like to retrieve list of repositories present in Git as soon as i click on 'Build with Parameters' button as shown below:

enter image description here

I have gone through several links but none of them seem to answer what i am looking for. I know i can schedule a cron which would list down the repositories in a file and then with the help of 'Extended Choice Parameter' plugin, 'Multi Select' parameter will automatically populate but i am looking for a way that does not involve using an external script; everything should happen through Jenkins and with a single job. Groovy looks like the tool but i am not sure. Any suggestion?

Using Perl for my build script & Jenkins ver. is 1.547

Best Answer

Would the Git parameter plugin do what you are looking for?

You might also look at the Extended Choice Parameter Script plugin, Extensible Choice Parameter plugin, or Jenkins Dynamic Parameter Plug-in. For more inspiration look at Jenkins plugin page.

Related Topic