We need to print Jenkins jobs URLs and GIT URL configured inside these jobs.
For example:
Assume my Jenkins URL is : http://localhost:8080 & my git URL is s
This worked for me:
Jenkins.instance.getAllItems(Job.class).each { scm = it.getScm(); project = it.getAbsoluteUrl(); if (scm instanceof hudson.plugins.git.GitSCM) { scm.getRepositories().each { it.getURIs().each { println(project.toString() +":"+ it.toString()); } } } } println "done"