mirror of
https://github.com/Fishwaldo/rundeck-api-java-client.git
synced 2025-07-06 21:18:18 +00:00
Wagon: Deploying site to repository
This commit is contained in:
parent
ab8cc37094
commit
588f41982b
196 changed files with 3454 additions and 3317 deletions
17
groovy.html
17
groovy.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 31, 2011 -->
|
||||
<!-- Generated by Apache Maven Doxia at Aug 1, 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="20110731" />
|
||||
<meta name="Date-Revision-yyyymmdd" content="20110801" />
|
||||
<meta http-equiv="Content-Language" content="en" />
|
||||
|
||||
<!-- Google Analytics -->
|
||||
|
@ -49,8 +49,8 @@
|
|||
</div>
|
||||
<div class="xright">
|
||||
|
||||
<span id="publishDate">Last Published: 2011-07-31</span>
|
||||
| <span id="projectVersion">Version: 2.0-SNAPSHOT</span>
|
||||
<span id="publishDate">Last Published: 2011-08-01</span>
|
||||
| <span id="projectVersion">Version: 2.0</span>
|
||||
</div>
|
||||
<div class="clear">
|
||||
<hr/>
|
||||
|
@ -99,7 +99,7 @@
|
|||
<h5>Older versions</h5>
|
||||
<ul>
|
||||
<li class="none">
|
||||
<a href="1.x/index.html" title="1.x (RunDedeck 1.2)">1.x (RunDedeck 1.2)</a>
|
||||
<a href="1.x/index.html" title="1.x (RunDeck 1.2)">1.x (RunDeck 1.2)</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h5>Project Documentation</h5>
|
||||
|
@ -121,7 +121,7 @@
|
|||
<div id="bodyColumn">
|
||||
<div id="contentBox">
|
||||
<div class="section"><h2>Using the RunDeck API from Groovy scripts<a name="Using_the_RunDeck_API_from_Groovy_scripts"></a></h2></div><p>Here are some examples of what you can do with this lib and a few lines of <a class="externalLink" href="http://groovy.codehaus.org/">Groovy</a>.</p><p>We can use <a class="externalLink" href="http://groovy.codehaus.org/Grape">Grape</a> to download the lib (and its dependencies) from the <a class="externalLink" href="http://search.maven.org/">Maven Central Repository</a>, so you don't have to install anything manually (except Groovy, of course).</p><div class="section"><h3>Basic usage<a name="Basic_usage"></a></h3></div><p>Save the following script in a file named "<tt>rundeck.groovy</tt>", and execute it with "<tt>groovy rundeck.groovy</tt>". Feeling Groovy ? ;-)</p><div class="source"><pre>// we use Grape (Ivy) to download the lib (and its dependencies) from Maven Central Repository
|
||||
@Grab(group='org.rundeck', module='rundeck-api-java-client', version='1.2')
|
||||
@Grab(group='org.rundeck', module='rundeck-api-java-client', version='2.0')
|
||||
import org.rundeck.api.RundeckClient
|
||||
|
||||
rundeck = new RundeckClient("http://localhost:4440", "admin", "admin")
|
||||
|
@ -140,6 +140,11 @@ println "All RunDeck projects : ${rundeck.projects}"
|
|||
println "All RunDeck nodes : ${rundeck.nodes}"
|
||||
println "All RunDeck jobs : ${rundeck.jobs}"
|
||||
println "All RunDeck running executions : ${rundeck.runningExecutions}"
|
||||
</pre></div><div class="section"><h3>Authentication<a name="Authentication"></a></h3></div><p>Starting with RunDeck API 2, there are 2 ways to authenticate :</p><ul><li>the <b>login-based authentication</b> : with your login and password</li><li>the <b>token-based authentication</b> : with a unique token that you can generate from the RunDeck webUI</li></ul><div class="source"><pre>// using login-based authentication (admin/admin is the default login/password for a new RunDeck instance) :
|
||||
rundeck = new RundeckClient("http://localhost:4440", "admin", "admin");
|
||||
|
||||
// using token-based authentication :
|
||||
rundeck = new RundeckClient("http://localhost:4440", "PDDNKo5VE29kpk4prOUDr2rsKdRkEvsD");
|
||||
</pre></div><div class="section"><h3>Running a job<a name="Running_a_job"></a></h3></div><div class="source"><pre>import org.rundeck.api.RundeckClient
|
||||
rundeck = new RundeckClient("http://localhost:4440", "admin", "admin")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue