Skip to content

Instantly share code, notes, and snippets.

@tizki
Last active September 7, 2016 18:53
Show Gist options
  • Save tizki/0e46677e5f65c901826cb0e3ba11ae9b to your computer and use it in GitHub Desktop.
Save tizki/0e46677e5f65c901826cb0e3ba11ae9b to your computer and use it in GitHub Desktop.
This scripts shows how to get basic information about Jenkins instance
/* This scripts shows how to get basic information about Jenkins instance */
def jenkins = Jenkins.getInstance()
println "Jenkins version: ${jenkins.getVersion()}"
println "Available JDKs: ${jenkins.getInstance().getJDKs()}"
println "Connected Nodes:"
jenkins.getNodes().each{
println it.displayName
}
println "Configured labels: ${jenkins.getLabels()}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment