mirror of
https://github.com/Fishwaldo/rundeck-api-java-client.git
synced 2025-07-06 13:08:38 +00:00
Wagon: Deploying site to repository
This commit is contained in:
parent
794c1c4af2
commit
ed782f19c5
147 changed files with 3180 additions and 1626 deletions
14
jruby.html
14
jruby.html
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!-- Generated by Apache Maven Doxia at Jul 6, 2011 -->
|
||||
<!-- Generated by Apache Maven Doxia at Jul 7, 2011 -->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
|
@ -10,7 +10,7 @@
|
|||
@import url("./css/site.css");
|
||||
</style>
|
||||
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
|
||||
<meta name="Date-Revision-yyyymmdd" content="20110706" />
|
||||
<meta name="Date-Revision-yyyymmdd" content="20110707" />
|
||||
<meta http-equiv="Content-Language" content="en" />
|
||||
|
||||
<!-- Google Analytics -->
|
||||
|
@ -49,7 +49,7 @@
|
|||
</div>
|
||||
<div class="xright">
|
||||
|
||||
<span id="publishDate">Last Published: 2011-07-06</span>
|
||||
<span id="publishDate">Last Published: 2011-07-07</span>
|
||||
| <span id="projectVersion">Version: 1.0-SNAPSHOT</span>
|
||||
</div>
|
||||
<div class="clear">
|
||||
|
@ -118,7 +118,7 @@ puts "All RunDeck projects : #{rundeck.projects}"
|
|||
puts "All RunDeck nodes : #{rundeck.nodes}"
|
||||
puts "All RunDeck jobs : #{rundeck.jobs}"
|
||||
puts "All RunDeck running executions : #{rundeck.runningExecutions}"
|
||||
</pre></div><p>You can also add the librairie to the classpath : save the following script in a file named "<tt>rundeck.rb</tt>", and execute it with "<tt>jruby -rjava -J-cp /path/to/rundeck-api-java-client-VERSION-jar-with-dependencies.jar rundeck.rb</tt>".</p><div class="source"><pre>import org.rundeck.api.RundeckClient
|
||||
</pre></div><p>You can also add the library to the classpath : save the following script in a file named "<tt>rundeck.rb</tt>", and execute it with "<tt>jruby -rjava -J-cp /path/to/rundeck-api-java-client-VERSION-jar-with-dependencies.jar rundeck.rb</tt>".</p><div class="source"><pre>import org.rundeck.api.RundeckClient
|
||||
|
||||
rundeck = RundeckClient.new("http://localhost:4440", "admin", "admin")
|
||||
|
||||
|
@ -148,7 +148,7 @@ execution = rundeck.triggerJob("job-id", OptionsBuilder.new().addOptio
|
|||
|
||||
// last one : you can run a job and wait until its execution is finished :
|
||||
execution = rundeck.runJob("job-id")
|
||||
puts "Execution finished ! Status : #{execution.status}, duration (in seconds) : #{execution.durationInSeconds}"
|
||||
puts "Execution finished ! Status : #{execution.status}, duration : #{execution.duration}"
|
||||
</pre></div><div class="section"><h3>Running an ad-hoc command<a name="Running_an_ad-hoc_command"></a></h3></div><div class="source"><pre>import org.rundeck.api.RundeckClient
|
||||
import org.rundeck.api.NodeFiltersBuilder
|
||||
|
||||
|
@ -159,6 +159,10 @@ execution = rundeck.triggerAdhocCommand("my-project", "uptime&quo
|
|||
|
||||
// run the "uptime" command on all unix nodes
|
||||
execution = rundeck.runAdhocCommand("my-project", "uptime", NodeFiltersBuilder.new().osFamily("unix").toProperties())
|
||||
</pre></div><div class="section"><h3>Exporting jobs<a name="Exporting_jobs"></a></h3></div><div class="source"><pre>import org.rundeck.api.RundeckClient
|
||||
rundeck = RundeckClient.new("http://localhost:4440", "admin", "admin")
|
||||
|
||||
rundeck.exportJobsToFile("/tmp/jobs.xml", "my-project")
|
||||
</pre></div><div class="section"><h3>And more...<a name="And_more..."></a></h3></div><p>See the API documentation of the <a href="./apidocs/org/rundeck/api/RundeckClient.html">RundeckClient</a> class for more interactions with your RunDeck instance...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue