Jenkins – How to get all build numbers of particular job in jenkins using groovy script

groovyJenkinsjenkins-plugins

I am using active choice plugin, have groovy script which retrieves names of all jobs in Jenkins. Can I write a groovy script which get me list of all the build numbers of that particular job.

Best Answer

In order to get a list of builds for a particular job using the active choice plugin, You can use the following example.

First, create an active choice parameter for retriving the job names: enter image description here

Then create an active choice parameter for retriving the build numbers from the selected job: enter image description here