1
votes

I am running a Jenkins server with multiple slave nodes, all of which use the SSH Slaves plugin to launch jobs. I am trying to get a simple Groovy script to run through all the nodes and report the Host entry in the SSH Slaves config. My groovy skills are not very good and I'm not really an OO guy, so I can't figure it out.

1

1 Answers

1
votes
for (aSlave in hudson.model.Hudson.instance.slaves) {
  println('====================');
  println "${aSlave.name}: \t ${aSlave.getLauncher().getHost()}";
}