Skip to content

Instantly share code, notes, and snippets.

@phaneesh
Last active August 2, 2022 12:18
Show Gist options
  • Save phaneesh/cfcd099a1ef35e37f1fa34a7d70b0353 to your computer and use it in GitHub Desktop.
Save phaneesh/cfcd099a1ef35e37f1fa34a7d70b0353 to your computer and use it in GitHub Desktop.
Jenkins git repository URL for all jobs in a view
import jenkins.model.*
Jenkins.instance.getView('<view name>').items.each {
try {
println(it.fullName +"," + it.getScm().getUserRemoteConfigs()[0].getUrl())
} catch(Exception e) {
println("Error getting git url for: " +it)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment