Skip to content

Instantly share code, notes, and snippets.

@srz-zumix
Created March 11, 2015 01:44
Show Gist options
  • Save srz-zumix/1af87137c7a52e2b5020 to your computer and use it in GitHub Desktop.
Save srz-zumix/1af87137c7a52e2b5020 to your computer and use it in GitHub Desktop.
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