Created
July 26, 2011 05:45
-
-
Save ingorichter/1106058 to your computer and use it in GitHub Desktop.
groovy cli script to display all jobs with a perforce scm configuration
This file contains 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
def jobs = hudson.model.Hudson.instance.items | |
jobs.each { job -> | |
def scm = job.scm | |
if (scm.class.name == 'hudson.plugins.perforce.PerforceSCM') { | |
println "Job '${job.name}' uses the following perforce configuration" | |
println '-' * 80 | |
println "P4Port: ${scm.getP4Port()}" | |
println "P4Client: ${scm.getP4Client()}" | |
println "P4User: ${scm.getP4User()}" | |
println "P4Password: ${scm.getP4Passwd()}" | |
println '=' * 80 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the script it works perfectly for free-style jobs. Do you have one for pipeline (Written in Jenkins GUI) based?