From 852fab040754c5740373467f895e2304e4795a00 Mon Sep 17 00:00:00 2001 From: Vincent Behar Date: Wed, 6 Jul 2011 15:04:47 +0200 Subject: [PATCH] add example of listing all running executions --- src/site/confluence/groovy.confluence | 2 ++ src/site/confluence/jruby.confluence | 2 ++ src/site/confluence/jython.confluence | 1 + 3 files changed, 5 insertions(+) diff --git a/src/site/confluence/groovy.confluence b/src/site/confluence/groovy.confluence index aed5bf9..8fc67d5 100644 --- a/src/site/confluence/groovy.confluence +++ b/src/site/confluence/groovy.confluence @@ -22,6 +22,7 @@ rundeck = new RundeckClient("http://localhost:4440", "admin", "admin") println "All RunDeck projects : ${rundeck.projects}" println "All RunDeck jobs : ${rundeck.jobs}" +println "All RunDeck running executions : ${rundeck.runningExecutions}" {code} You can also [download|./download.html] the lib and all its dependencies in 1 big jar file, and add it to your classpath before running your script : save the following script in a file named "{{rundeck.groovy}}", and execute it with "{{groovy -cp /path/to/rundeck-api-java-client-VERSION-jar-with-dependencies.jar rundeck.groovy}}". @@ -33,6 +34,7 @@ rundeck = new RundeckClient("http://localhost:4440", "admin", "admin") println "All RunDeck projects : ${rundeck.projects}" println "All RunDeck jobs : ${rundeck.jobs}" +println "All RunDeck running executions : ${rundeck.runningExecutions}" {code} h2. Running a job diff --git a/src/site/confluence/jruby.confluence b/src/site/confluence/jruby.confluence index 9f4f1e1..a292576 100644 --- a/src/site/confluence/jruby.confluence +++ b/src/site/confluence/jruby.confluence @@ -18,6 +18,7 @@ rundeck = RundeckClient.new("http://localhost:4440", "admin", "admin") puts "All RunDeck projects : #{rundeck.projects}" puts "All RunDeck jobs : #{rundeck.jobs}" +puts "All RunDeck running executions : #{rundeck.runningExecutions}" {code} You can also add the librairie to the classpath : save the following script in a file named "{{rundeck.rb}}", and execute it with "{{jruby -rjava -J-cp /path/to/rundeck-api-java-client-VERSION-jar-with-dependencies.jar rundeck.rb}}". @@ -29,6 +30,7 @@ rundeck = RundeckClient.new("http://localhost:4440", "admin", "admin") puts "All RunDeck projects : #{rundeck.projects}" puts "All RunDeck jobs : #{rundeck.jobs}" +puts "All RunDeck running executions : #{rundeck.runningExecutions}" {code} h2. Running a job diff --git a/src/site/confluence/jython.confluence b/src/site/confluence/jython.confluence index c03b348..3d4b4cc 100644 --- a/src/site/confluence/jython.confluence +++ b/src/site/confluence/jython.confluence @@ -16,6 +16,7 @@ rundeck = RundeckClient("http://localhost:4440", "admin", "admin") print("All RunDeck projects : %s" % rundeck.projects) print("All RunDeck jobs : %s" % rundeck.jobs) +print("All RunDeck running executions : %s" % rundeck.runningExecutions) {code} h2. Running a job