Created
March 11, 2015 01:44
-
-
Save srz-zumix/1af87137c7a52e2b5020 to your computer and use it in GitHub Desktop.
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 printSystemProperty(key) | |
{ | |
def jenkins = hudson.model.Hudson.instance | |
def slaves = jenkins.slaves | |
slaves.each { | |
def com = it.toComputer() | |
def properties = com.getSystemProperties() | |
if( properties != null ) | |
{ | |
def ver = properties[key] | |
if( ver != null ) | |
{ | |
println(it.getNodeName()) | |
println(ver) | |
} | |
} | |
} | |
} | |
printSystemProperty("java.version") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment