Skip to content

Instantly share code, notes, and snippets.

@tizki
Created January 24, 2016 10:03
Show Gist options
  • Save tizki/09082c556db979639e22 to your computer and use it in GitHub Desktop.
Save tizki/09082c556db979639e22 to your computer and use it in GitHub Desktop.
groovy script that prints all job name per jenkins throttle plugin category
import hudson.plugins.throttleconcurrents.*
jenkins = Jenkins.getInstance()
ThrottleJobProperty.DescriptorImpl descriptor = jenkins.getDescriptorByType(ThrottleJobProperty.DescriptorImpl.class)
categories = descriptor.getCategories()
propertiesMap = descriptor.propertiesByCategory
propertiesMap.each { categoryName, subMap ->
println "******** Name ${categoryName} ********"
subMap.each {propertyName, value ->
println (" Job Name: ${propertyName.owner.name}")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment