Last active
August 2, 2022 12:18
-
-
Save phaneesh/cfcd099a1ef35e37f1fa34a7d70b0353 to your computer and use it in GitHub Desktop.
Jenkins git repository URL for all jobs in a view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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