Skip to content

Instantly share code, notes, and snippets.

@ctrabold
Created September 26, 2010 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ctrabold/597966 to your computer and use it in GitHub Desktop.
Save ctrabold/597966 to your computer and use it in GitHub Desktop.
import hudson.model.*
import hudson.tasks.*
hudsonInstance = hudson.model.Hudson.instance
allItems = hudsonInstance.items
jobs = allItems.findAll{job ->
job.isBuildable()
job instanceof FreeStyleProject
job.name =~ "prefix-.*"
}
jobs.each{ item ->
println("JOB : "+item.name);
println("SCM local: "+item.scm.getLocations()[0].local);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment