Created
November 4, 2013 22:27
-
-
Save willkelly/7310299 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
commands = """ | |
def p = "sudo ip a".execute() | |
p.waitFor() | |
print p.in.text | |
print p.err.text | |
""" | |
//def commands = "print \"Hello world!\"" | |
println "AUGH: ${hudson.model.Hudson.instance.slaves}" | |
for (slave in hudson.model.Hudson.instance.slaves) { | |
println slave.name; | |
try { | |
println "*** running commands on ${slave.name} ***" | |
def out = hudson.util.RemotingDiagnostics.executeGroovy(commands, slave.getChannel()); | |
println "out: ${out}" | |
println "out dump: ${out.dump()}" | |
} catch (e) {println "OMGS ERROR ${e.getMessage()}"} | |
println slave.name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment