Skip to content
Snippets Groups Projects
Unverified Commit 90a6b027 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony Committed by GitHub
Browse files

Groovy script to run a proces on all Jenkins nodes

parent 3ba86000
No related branches found
No related tags found
No related merge requests found
......@@ -414,8 +414,8 @@ Print All Loggers
println "${it}";
}
Run a Process
-------------
Run a Process On a Single Node
------------------------------
.. code-block:: groovy
......@@ -426,6 +426,22 @@ Run a Process
Process p = "cmd /c Taskkill /F /IM MantidPlot.exe".execute()
println "${p.text}"
Run a Process Across All Nodes
------------------------------
.. code-block:: groovy
import hudson.util.RemotingDiagnostics;
for (slave in hudson.model.Hudson.instance.slaves) {
println slave.name;
// is it connected?
if(slave.getChannel()) {
println RemotingDiagnostics.executeGroovy("println \"ls\".execute().text", slave.getChannel());
}
}
Update default values for job parameters
----------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment