Skip to content

Instantly share code, notes, and snippets.

@tizki
Created September 13, 2016 20:27
Show Gist options
  • Save tizki/f0f4b3cadfe55e4024d4fe77527613ee to your computer and use it in GitHub Desktop.
Save tizki/f0f4b3cadfe55e4024d4fe77527613ee to your computer and use it in GitHub Desktop.
This script prints all labels of each unix slave
/* This script prints all labels of each unix slave */
def jenkins = Jenkins.getInstance()
def nodes = jenkins.getNodes()
def unixNodes = nodes.findAll{ it.getComputer().isUnix()}
unixNodes.each{
println it.getLabelString()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment