Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jmara/27bffb7b699b87e5dc9ce4be66c5014e to your computer and use it in GitHub Desktop.
Save jmara/27bffb7b699b87e5dc9ce4be66c5014e to your computer and use it in GitHub Desktop.
import hudson.util.RemotingDiagnostics;
script = 'def proc = "ls -1 /media".execute(); proc.waitFor(); println proc.in.text';
for (slave in Jenkins.instance.slaves) {
println slave.name;
try {
println RemotingDiagnostics.executeGroovy(script, slave.getChannel());
} catch (all) {
all.printStackTrace();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment