beanstalkapp 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.rdoc +4 -0
- data/VERSION +1 -1
- data/beanstalkapp.gemspec +106 -2
- data/doc/account.html +192 -0
- data/doc/changelog.html +150 -0
- data/doc/changeset.html +256 -0
- data/doc/comment.html +299 -0
- data/doc/files/javascripts/code-highlighter.js +190 -0
- data/doc/files/javascripts/global.js +67 -0
- data/doc/files/javascripts/mootools-1.2.4-core-yc.js +357 -0
- data/doc/files/stylesheets/global.css +2152 -0
- data/doc/files/stylesheets/ie7.css +85 -0
- data/doc/images/apple-touch-icon.png +0 -0
- data/doc/images/b-search.gif +0 -0
- data/doc/images/b-submit.gif +0 -0
- data/doc/images/b-tour.png +0 -0
- data/doc/images/bg-comments-count.png +0 -0
- data/doc/images/bg-corners.png +0 -0
- data/doc/images/bg-header-pattern-alt.png +0 -0
- data/doc/images/bg-header-pattern.png +0 -0
- data/doc/images/bg-header.png +0 -0
- data/doc/images/bg-input.png +0 -0
- data/doc/images/bg-page-pattern-alt.png +0 -0
- data/doc/images/bg-page-pattern.png +0 -0
- data/doc/images/bg-plans.png +0 -0
- data/doc/images/bg-ref-basecamp.gif +0 -0
- data/doc/images/bg-ref-lighthouse.gif +0 -0
- data/doc/images/bg-ref-rackspace.gif +0 -0
- data/doc/images/bg-ref-versions.gif +0 -0
- data/doc/images/bg-referrer.png +0 -0
- data/doc/images/bg-screenshot.png +0 -0
- data/doc/images/bg-tooltip.png +0 -0
- data/doc/images/button.png +0 -0
- data/doc/images/customers/blueflavor.png +0 -0
- data/doc/images/customers/brightcove.png +0 -0
- data/doc/images/customers/flipshake-s.png +0 -0
- data/doc/images/customers/flipshake.png +0 -0
- data/doc/images/customers/helloenjoy-s.png +0 -0
- data/doc/images/customers/helloenjoy.png +0 -0
- data/doc/images/customers/netmagazine.jpg +0 -0
- data/doc/images/customers/newrelic.png +0 -0
- data/doc/images/customers/puma.png +0 -0
- data/doc/images/customers/realmac-s.png +0 -0
- data/doc/images/customers/realmac.png +0 -0
- data/doc/images/customers/scrapblog.png +0 -0
- data/doc/images/customers/store74.gif +0 -0
- data/doc/images/customers/theappleblog.jpg +0 -0
- data/doc/images/customers/tuaw.jpg +0 -0
- data/doc/images/customers/vzaar-s.png +0 -0
- data/doc/images/customers/vzaar.png +0 -0
- data/doc/images/customers/wufoo-s.png +0 -0
- data/doc/images/customers/wufoo.png +0 -0
- data/doc/images/favicon.ico +0 -0
- data/doc/images/i-arrow.png +0 -0
- data/doc/images/i-cc.png +0 -0
- data/doc/images/i-checkmark.png +0 -0
- data/doc/images/i-features.png +0 -0
- data/doc/images/i-help.png +0 -0
- data/doc/images/i-input-email.png +0 -0
- data/doc/images/i-input-password.png +0 -0
- data/doc/images/i-leaf.png +0 -0
- data/doc/images/i-lock-sml.png +0 -0
- data/doc/images/i-rss.png +0 -0
- data/doc/images/i-tour-help.png +0 -0
- data/doc/images/logo-rackspace.gif +0 -0
- data/doc/images/logo-sml.png +0 -0
- data/doc/images/logo-wildbit.png +0 -0
- data/doc/images/logo.png +0 -0
- data/doc/images/logos/basecamp-ref.png +0 -0
- data/doc/images/logos/basecamp.png +0 -0
- data/doc/images/logos/campfire.png +0 -0
- data/doc/images/logos/cloudscaling.png +0 -0
- data/doc/images/logos/collabnet.gif +0 -0
- data/doc/images/logos/dynect.png +0 -0
- data/doc/images/logos/fogbugz.png +0 -0
- data/doc/images/logos/freckle.png +0 -0
- data/doc/images/logos/harvest-ref.gif +0 -0
- data/doc/images/logos/harvest.png +0 -0
- data/doc/images/logos/lighthouse-ref.png +0 -0
- data/doc/images/logos/lighthouse.png +0 -0
- data/doc/images/logos/pixelnovel.png +0 -0
- data/doc/images/logos/rackspace-ref.gif +0 -0
- data/doc/images/logos/rackspace.gif +0 -0
- data/doc/images/logos/rackspace.png +0 -0
- data/doc/images/logos/splunk-s.png +0 -0
- data/doc/images/logos/splunk.png +0 -0
- data/doc/images/logos/teamsupport.png +0 -0
- data/doc/images/logos/twitter.png +0 -0
- data/doc/images/logos/versions-ref.gif +0 -0
- data/doc/images/logos/versions.png +0 -0
- data/doc/images/promo-screenshots.png +0 -0
- data/doc/images/sep-promo.png +0 -0
- data/doc/images/ss-browse.png +0 -0
- data/doc/images/ss-changeset.png +0 -0
- data/doc/images/ss-dashboard.png +0 -0
- data/doc/images/ss-integrations.png +0 -0
- data/doc/images/ss-releases.png +0 -0
- data/doc/images/ss-repositories.png +0 -0
- data/doc/images/ss-signup-motivator.jpg +0 -0
- data/doc/introduction.html +152 -0
- data/doc/rails_plugin.html +141 -0
- data/doc/release.html +282 -0
- data/doc/release_server.html +340 -0
- data/doc/repository.html +326 -0
- data/doc/ruby_gem.html +160 -0
- data/doc/server_environment.html +270 -0
- data/doc/user.html +210 -0
- data/lib/beanstalkapp/release.rb +6 -2
- data/test/integration.rb +11 -3
- metadata +106 -2
data/doc/release.html
ADDED
@@ -0,0 +1,282 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html lang="en">
|
4
|
+
<head>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<title>Beanstalk — Hassle-free Subversion Hosting</title>
|
7
|
+
<meta name="description" content="Beanstalk allows designers and developers to store source code, track changes, and collaborate with their team.">
|
8
|
+
<meta name="author" content="Wildbit, LLC">
|
9
|
+
<meta name="viewport" content="width=980">
|
10
|
+
|
11
|
+
<!--[if IE]>
|
12
|
+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
13
|
+
<![endif]-->
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="files/stylesheets/global.css" media="all">
|
16
|
+
|
17
|
+
<!--[if IE 7]>
|
18
|
+
<link rel="stylesheet" href="files/stylesheets/ie7.css" media="all">
|
19
|
+
<![endif]-->
|
20
|
+
|
21
|
+
<script type="text/javascript" src="files/javascripts/mootools-1.2.4-core-yc.js"></script>
|
22
|
+
<script type="text/javascript" src="files/javascripts/code-highlighter.js"></script>
|
23
|
+
<script type="text/javascript" src="files/javascripts/global.js"></script>
|
24
|
+
|
25
|
+
<link rel="shortcut icon" href="images/favicon.ico">
|
26
|
+
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
|
27
|
+
</head>
|
28
|
+
|
29
|
+
<body>
|
30
|
+
<header>
|
31
|
+
<div class="container">
|
32
|
+
|
33
|
+
<hgroup>
|
34
|
+
<h1><a href="http://beanstalkapp.com">Beanstalk</a></h1>
|
35
|
+
<h2><a href="http://beanstalkapp.com">Version Control with a Human Face</a></h2>
|
36
|
+
</hgroup>
|
37
|
+
|
38
|
+
<nav>
|
39
|
+
<ul>
|
40
|
+
<li><a href="http://beanstalkapp.com">Home</a></li>
|
41
|
+
<li><a href="http://beanstalkapp.com/features">Feature Tour</a></li>
|
42
|
+
<li><a href="http://beanstalkapp.com/buzz">Buzz</a></li>
|
43
|
+
<li><a href="http://help.beanstalkapp.com/">Support</a></li>
|
44
|
+
<li><a href="http://beanstalkapp.com/partners">Partners</a></li>
|
45
|
+
<li><a href="http://blog.beanstalkapp.com">Blog</a></li>
|
46
|
+
<li><strong>API & Tools</strong></li>
|
47
|
+
<li class="link-signin"><a href="https://login.beanstalkapp.com">Log In</a></li>
|
48
|
+
<li class="link-signup"><a href="http://beanstalkapp.com/pricing">Pricing & Sign Up</a></li>
|
49
|
+
</ul>
|
50
|
+
</nav>
|
51
|
+
|
52
|
+
<b class="cl"></b><b class="cr"></b>
|
53
|
+
</div>
|
54
|
+
</header>
|
55
|
+
|
56
|
+
<div class="page" id="api">
|
57
|
+
<div class="container">
|
58
|
+
<section class="wrap">
|
59
|
+
<h1>Release model</h1>
|
60
|
+
<p>The release model is associate with the <a href="release_server.html">Release Server</a> model, which allows you to deploy your code via <span class="caps">FTP</span> or <span class="caps">SFTP</span> to your web server.</p>
|
61
|
+
<h3>Writable attributes</h3>
|
62
|
+
<ol>
|
63
|
+
<li><var>revision</var> — what revision of the server to deploy;</li>
|
64
|
+
<li><var>comment</var> — just text that will be displayed in release notes;</li>
|
65
|
+
<li><var>deploy_from_scratch</var> — deploy from the first revision rather then doing incremental deployment;</li>
|
66
|
+
<li><var>environment_id</var> — environment you want to deploy to.</li>
|
67
|
+
</ol>
|
68
|
+
<h3>Find all successful releases</h3>
|
69
|
+
<p><var>repository_id</var> is required. Either name of the repo or it’s ID can be used. Use <var>page</var> parameter to skim through pages. Beanstalk will send 20 releases per page.</p>
|
70
|
+
<div class="code_container http-request"><i>http-request</i><code class="http-request"><pre>GET /api/repo_name/releases.xml</pre></code></div>
|
71
|
+
|
72
|
+
<div class="code_container response">
|
73
|
+
<p>Click to expand…</p>
|
74
|
+
<i>http-response</i>
|
75
|
+
<pre><code><?xml version="1.0" encoding="UTF-8"?>
|
76
|
+
<releases type="array">
|
77
|
+
<release>
|
78
|
+
<account-id type="integer">23452</account-id>
|
79
|
+
<author>gilbert</author>
|
80
|
+
<comment>Deploying yesterday's changes.</comment>
|
81
|
+
<created-at type="datetime">
|
82
|
+
2009-11-04T10:03:29Z
|
83
|
+
</created-at>
|
84
|
+
<deployed-at type="datetime">
|
85
|
+
2009-11-04T10:03:40Z
|
86
|
+
</deployed-at>
|
87
|
+
<id type="integer">2547</id>
|
88
|
+
<last-retry-at type="datetime" nil="true"></last-retry-at>
|
89
|
+
<repository-id type="integer">98765</repository-id>
|
90
|
+
<environment-name>Staging</environment-name>
|
91
|
+
<environment-id>6</environment-id>
|
92
|
+
<retries type="integer">0</retries>
|
93
|
+
<revision type="integer">81</revision>
|
94
|
+
<state>complete</state>
|
95
|
+
<updated-at type="datetime">
|
96
|
+
2009-11-04T10:03:40Z
|
97
|
+
</updated-at>
|
98
|
+
</release>
|
99
|
+
<release>
|
100
|
+
<account-id type="integer">8765</account-id>
|
101
|
+
<author>ilya</author>
|
102
|
+
<comment>Going crazy</comment>
|
103
|
+
<created-at type="datetime">
|
104
|
+
2008-06-26T17:02:22Z
|
105
|
+
</created-at>
|
106
|
+
<deployed-at type="datetime">
|
107
|
+
2008-06-26T17:03:30Z
|
108
|
+
</deployed-at>
|
109
|
+
<id type="integer">6543</id>
|
110
|
+
<last-retry-at type="datetime" nil="true"></last-retry-at>
|
111
|
+
<repository-id type="integer">8967</repository-id>
|
112
|
+
<environment-name>Staging</environment-name>
|
113
|
+
<environment-id>6</environment-id>
|
114
|
+
<retries type="integer">0</retries>
|
115
|
+
<revision type="integer">249</revision>
|
116
|
+
<state>complete</state>
|
117
|
+
<updated-at type="datetime">
|
118
|
+
2008-11-04T14:50:01Z
|
119
|
+
</updated-at>
|
120
|
+
</release>
|
121
|
+
</releases></code></pre>
|
122
|
+
</div>
|
123
|
+
<div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>Beanstalk::API::Release.find_all_for_environment(environment_id=7, "repo", page=nil)</pre></code></div>
|
124
|
+
<h3>Find a single release</h3>
|
125
|
+
<p><var>repository_id</var> is required. Either name of the repo or it’s ID can be used. Release ID is required.</p>
|
126
|
+
<div class="code_container http-request"><i>http-request</i><code class="http-request"><pre>GET /api/repo_name/8765.xml</pre></code></div>
|
127
|
+
<div class="code_container response">
|
128
|
+
<p>Click to expand…</p>
|
129
|
+
<i>http-response</i>
|
130
|
+
<pre><code><?xml version="1.0" encoding="UTF-8"?>
|
131
|
+
<release>
|
132
|
+
<account-id type="integer">8765</account-id>
|
133
|
+
<author>ilya</author>
|
134
|
+
<comment>Going crazy</comment>
|
135
|
+
<created-at type="datetime">
|
136
|
+
2008-06-26T17:02:22Z
|
137
|
+
</created-at>
|
138
|
+
<deployed-at type="datetime">
|
139
|
+
2008-06-26T17:03:30Z
|
140
|
+
</deployed-at>
|
141
|
+
<id type="integer">6543</id>
|
142
|
+
<last-retry-at type="datetime" nil="true"></last-retry-at>
|
143
|
+
<repository-id type="integer">8967</repository-id>
|
144
|
+
<environment-name>Staging</environment-name>
|
145
|
+
<environment-id>6</environment-id>
|
146
|
+
<retries type="integer">0</retries>
|
147
|
+
<revision type="integer">249</revision>
|
148
|
+
<state>complete</state>
|
149
|
+
<updated-at type="datetime">
|
150
|
+
2008-11-04T14:50:01Z
|
151
|
+
</updated-at>
|
152
|
+
</release></code></pre>
|
153
|
+
</div>
|
154
|
+
<div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>Beanstalk::API::Release.find_for_repository(8765, "repo")</pre></code></div>
|
155
|
+
<h3>Create new release</h3>
|
156
|
+
<p>Creating a release means requesting a deployment. If you already have some releases in state “new” or “retry”, Beanstalk will delete them after creating a new one.</p>
|
157
|
+
<p>See the list of writable attributes at the top of the page. Both <var>revision</var> and <var>release_server_id</var> are required. <var>release_server_id</var> should be an ID of an enabled server under your account.</p>
|
158
|
+
<div class="code_container http-request"><i>http-request</i><code class="http-request"><pre>POST /api/repo_name/releases.xml/?environment_id=6
|
159
|
+
<release>
|
160
|
+
<revision type="integer">1</revision>
|
161
|
+
</release>
|
162
|
+
</pre></code></div>
|
163
|
+
<div class="code_container response">
|
164
|
+
<p>Click to expand…</p>
|
165
|
+
<i>http-response</i>
|
166
|
+
<pre><code><?xml version="1.0" encoding="UTF-8"?>
|
167
|
+
<release>
|
168
|
+
<account-id type="integer">23452</account-id>
|
169
|
+
<author>gilbert</author>
|
170
|
+
<comment>Deploying yesterday's changes.</comment>
|
171
|
+
<created-at type="datetime">
|
172
|
+
2009-11-04T10:03:29Z
|
173
|
+
</created-at>
|
174
|
+
<deployed-at type="datetime">
|
175
|
+
2009-11-04T10:03:40Z
|
176
|
+
</deployed-at>
|
177
|
+
<id type="integer">2547</id>
|
178
|
+
<last-retry-at type="datetime" nil="true"></last-retry-at>
|
179
|
+
<repository-id type="integer">98765</repository-id>
|
180
|
+
<environment-name>Staging</environment-name>
|
181
|
+
<environment-id>6</environment-id>
|
182
|
+
<retries type="integer">0</retries>
|
183
|
+
<revision type="integer">81</revision>
|
184
|
+
<state>complete</state>
|
185
|
+
<updated-at type="datetime">
|
186
|
+
2009-11-04T10:03:40Z
|
187
|
+
</updated-at>
|
188
|
+
</release>
|
189
|
+
|
190
|
+
--OR IF INVALID--
|
191
|
+
|
192
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
193
|
+
<errors>
|
194
|
+
<error>Server can't be blank</error>
|
195
|
+
</errors></code></pre>
|
196
|
+
</div>
|
197
|
+
<div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>r = Beanstalk::API::Release.new
|
198
|
+
r.prefix_options = { :repository_id => 58, :environment_id => 6 }
|
199
|
+
r.revision = 1
|
200
|
+
r.save
|
201
|
+
</pre></code></div>
|
202
|
+
</section>
|
203
|
+
|
204
|
+
<section id="sidebar">
|
205
|
+
<ul class="tabs">
|
206
|
+
<li>
|
207
|
+
|
208
|
+
<a href="introduction.html">Introduction</a>
|
209
|
+
</li>
|
210
|
+
<li>
|
211
|
+
|
212
|
+
<a href="changelog.html">Changelog</a>
|
213
|
+
</li>
|
214
|
+
<li>
|
215
|
+
|
216
|
+
<a href="ruby_gem.html">Ruby Gem</a>
|
217
|
+
</li>
|
218
|
+
<li>
|
219
|
+
|
220
|
+
<a href="account.html">Account</a>
|
221
|
+
</li>
|
222
|
+
<li>
|
223
|
+
|
224
|
+
<a href="user.html">User</a>
|
225
|
+
</li>
|
226
|
+
<li>
|
227
|
+
|
228
|
+
<a href="repository.html">Repository</a>
|
229
|
+
</li>
|
230
|
+
<li>
|
231
|
+
|
232
|
+
<a href="changeset.html">Changeset</a>
|
233
|
+
</li>
|
234
|
+
<li>
|
235
|
+
|
236
|
+
<a href="comment.html">Comment</a>
|
237
|
+
</li>
|
238
|
+
<li>
|
239
|
+
|
240
|
+
<a href="server_environment.html">Server Environment</a>
|
241
|
+
</li>
|
242
|
+
<li>
|
243
|
+
|
244
|
+
<a href="release_server.html">Release Server</a>
|
245
|
+
</li>
|
246
|
+
<li>
|
247
|
+
|
248
|
+
<strong>→ Release</strong>
|
249
|
+
</li>
|
250
|
+
</ul>
|
251
|
+
</section>
|
252
|
+
</div>
|
253
|
+
</div>
|
254
|
+
|
255
|
+
<footer>
|
256
|
+
|
257
|
+
<div class="container">
|
258
|
+
<ul>
|
259
|
+
<li><a href="http://help.beanstalkapp.com/discussion/new">Contact</a></li>
|
260
|
+
<li><a href="http://blog.beanstalkapp.com">Blog</a></li>
|
261
|
+
<li><a href="http://twitter.com/beanstalkapp">Twitter</a></li>
|
262
|
+
<li><a href="http://beanstalkapp.com/security">Security</a></li>
|
263
|
+
<li><a href="http://beanstalkapp.com/privacy-policy">Privacy Policy</a></li>
|
264
|
+
<li><a href="http://beanstalkapp.com/terms-of-service">Terms of Service</a></li>
|
265
|
+
</ul>
|
266
|
+
<p>© <a href="http://wildbit.com/">Wildbit, <abbr>LLC</abbr></a>, 2010. All rights reserved. The Beanstalk logo and name are trademarks of Wildbit, <abbr>LLC</abbr>.</p>
|
267
|
+
</div>
|
268
|
+
|
269
|
+
</footer>
|
270
|
+
|
271
|
+
<script type="text/javascript">
|
272
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
273
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
274
|
+
</script>
|
275
|
+
<script type="text/javascript">
|
276
|
+
try {
|
277
|
+
var pageTracker = _gat._getTracker("UA-507677-5");
|
278
|
+
pageTracker._setDomainName(".beanstalkapp.com");
|
279
|
+
pageTracker._trackPageview();
|
280
|
+
} catch(err) {}</script>
|
281
|
+
</body>
|
282
|
+
</html>
|
@@ -0,0 +1,340 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html lang="en">
|
4
|
+
<head>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<title>Beanstalk — Hassle-free Subversion Hosting</title>
|
7
|
+
<meta name="description" content="Beanstalk allows designers and developers to store source code, track changes, and collaborate with their team.">
|
8
|
+
<meta name="author" content="Wildbit, LLC">
|
9
|
+
<meta name="viewport" content="width=980">
|
10
|
+
|
11
|
+
<!--[if IE]>
|
12
|
+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
13
|
+
<![endif]-->
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="files/stylesheets/global.css" media="all">
|
16
|
+
|
17
|
+
<!--[if IE 7]>
|
18
|
+
<link rel="stylesheet" href="files/stylesheets/ie7.css" media="all">
|
19
|
+
<![endif]-->
|
20
|
+
|
21
|
+
<script type="text/javascript" src="files/javascripts/mootools-1.2.4-core-yc.js"></script>
|
22
|
+
<script type="text/javascript" src="files/javascripts/code-highlighter.js"></script>
|
23
|
+
<script type="text/javascript" src="files/javascripts/global.js"></script>
|
24
|
+
|
25
|
+
<link rel="shortcut icon" href="images/favicon.ico">
|
26
|
+
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
|
27
|
+
</head>
|
28
|
+
|
29
|
+
<body>
|
30
|
+
<header>
|
31
|
+
<div class="container">
|
32
|
+
|
33
|
+
<hgroup>
|
34
|
+
<h1><a href="http://beanstalkapp.com">Beanstalk</a></h1>
|
35
|
+
<h2><a href="http://beanstalkapp.com">Version Control with a Human Face</a></h2>
|
36
|
+
</hgroup>
|
37
|
+
|
38
|
+
<nav>
|
39
|
+
<ul>
|
40
|
+
<li><a href="http://beanstalkapp.com">Home</a></li>
|
41
|
+
<li><a href="http://beanstalkapp.com/features">Feature Tour</a></li>
|
42
|
+
<li><a href="http://beanstalkapp.com/buzz">Buzz</a></li>
|
43
|
+
<li><a href="http://help.beanstalkapp.com/">Support</a></li>
|
44
|
+
<li><a href="http://beanstalkapp.com/partners">Partners</a></li>
|
45
|
+
<li><a href="http://blog.beanstalkapp.com">Blog</a></li>
|
46
|
+
<li><strong>API & Tools</strong></li>
|
47
|
+
<li class="link-signin"><a href="https://login.beanstalkapp.com">Log In</a></li>
|
48
|
+
<li class="link-signup"><a href="http://beanstalkapp.com/pricing">Pricing & Sign Up</a></li>
|
49
|
+
</ul>
|
50
|
+
</nav>
|
51
|
+
|
52
|
+
<b class="cl"></b><b class="cr"></b>
|
53
|
+
</div>
|
54
|
+
</header>
|
55
|
+
|
56
|
+
<div class="page" id="api">
|
57
|
+
<div class="container">
|
58
|
+
<section class="wrap">
|
59
|
+
<h1>Release Server model</h1>
|
60
|
+
<p>Beanstalk’s deployment tools allow you to deploy code via <span class="caps">FTP</span> or <span class="caps">SFTP</span> to your web server. With the <span class="caps">API</span>, you can interact with this functionality to enhance the deployment process for your own requirements. You might also want to see our “web hooks” feature, which can be found in the Integration section of your repository.</p>
|
61
|
+
<h3>Writable attributes</h3>
|
62
|
+
<ol>
|
63
|
+
<li><var>name</var> — must be unique in environment, name must be no longer than 20 chars;</li>
|
64
|
+
<li><var>local_path</var> — path inside the repository that will be deployed;</li>
|
65
|
+
<li><var>remote_path</var> — path on the remote server where Beanstalk will deploy to;</li>
|
66
|
+
<li><var>remote_addr</var> — remote server address;</li>
|
67
|
+
<li><var>protocol</var> — “ftp” or “sftp”;</li>
|
68
|
+
<li><var>port</var> — <span class="caps">FTP</span>/<span class="caps">SFTP</span> port;</li>
|
69
|
+
<li><var>login</var> — <span class="caps">FTP</span>/<span class="caps">SFTP</span> user login;</li>
|
70
|
+
<li><var>password</var> — <span class="caps">FTP</span>/<span class="caps">SFTP</span> user password;</li>
|
71
|
+
<li><var>use_active_mode</var> — “true” or “false”;</li>
|
72
|
+
<li><var>authenticate_by_key</var> — “true” or “false”. For <span class="caps">SFTP</span> servers only, will try to authenticate using <a href="http://anything.beanstalkapp.com/beanstalk_rsa.pub">Beanstalk’s public key</a>;</li>
|
73
|
+
<li><var>use_feat</var> — “true” or “false”;</li>
|
74
|
+
<li><var>pre_release_hook</var> — “http://yourhost.com/yourhook.php”. <span class="caps">URL</span> that we will <span class="caps">POST</span> information about current release to before starting deployment;</li>
|
75
|
+
<li><var>post_release_hook</var> — “http://yourhost.com/yourhook.php”. <span class="caps">URL</span> that we will <span class="caps">POST</span> information about current release to before after deployment was successful;</li>
|
76
|
+
</ol>
|
77
|
+
<h3>Description</h3>
|
78
|
+
<p>ReleaseServer is a model that contains connection settings used by Releases for deployments. Amount of Release Servers that you
|
79
|
+
can create is limited by your account’s plan.</p>
|
80
|
+
<h3>Find all Release Servers</h3>
|
81
|
+
<p>You need to specify the repository ID (it’s the number 58 in the example below) and environment ID (number 6 below).</p>
|
82
|
+
<div class="code_container http-request"><i>http-request</i><code class="http-request"><pre>GET /api/58/release_servers.xml?environment_id=6</pre></code></div>
|
83
|
+
|
84
|
+
<div class="code_container response">
|
85
|
+
<p>Click to expand…</p>
|
86
|
+
<i>http-response</i>
|
87
|
+
<pre><code><?xml version="1.0" encoding="UTF-8"?>
|
88
|
+
<release-servers type="array">
|
89
|
+
<release-server>
|
90
|
+
<account-id type="integer">8723</account-id>
|
91
|
+
<automatic type="boolean">false</automatic>
|
92
|
+
<created-at type="datetime">
|
93
|
+
2008-07-24T17:31:13Z
|
94
|
+
</created-at>
|
95
|
+
<id type="integer">864</id>
|
96
|
+
<local-path>/trunk/</local-path>
|
97
|
+
<login>login</login>
|
98
|
+
<name>development</name>
|
99
|
+
<password>password</password>
|
100
|
+
<port type="integer">22</port>
|
101
|
+
<protocol>sftp</protocol>
|
102
|
+
<remote-addr>example.com</remote-addr>
|
103
|
+
<remote-path>/tmp/example/deployment</remote-path>
|
104
|
+
<repository-id type="integer">247843</repository-id>
|
105
|
+
<environment-name>Staging</environment-name>
|
106
|
+
<server-environment-id>6</server-environment-id>
|
107
|
+
<revision type="integer">31</revision>
|
108
|
+
<updated-at type="datetime">
|
109
|
+
2008-10-29T17:17:52Z
|
110
|
+
</updated-at>
|
111
|
+
</release-server>
|
112
|
+
<release-server>
|
113
|
+
<account-id type="integer">96125</account-id>
|
114
|
+
<created-at type="datetime">
|
115
|
+
2008-07-23T20:44:55Z
|
116
|
+
</created-at>
|
117
|
+
<id type="integer">235</id>
|
118
|
+
<local-path>/var/www/site</local-path>
|
119
|
+
<login>login</login>
|
120
|
+
<name>development</name>
|
121
|
+
<password>password</password>
|
122
|
+
<port type="integer">21</port>
|
123
|
+
<protocol>ftp</protocol>
|
124
|
+
<remote-addr>ftp.example.com</remote-addr>
|
125
|
+
<remote-path>/</remote-path>
|
126
|
+
<repository-id type="integer">73451</repository-id>
|
127
|
+
<environment-name>Staging</environment-name>
|
128
|
+
<server-environment-id>6</server-environment-id>
|
129
|
+
<revision type="integer">0</revision>
|
130
|
+
<updated-at type="datetime">
|
131
|
+
2008-10-29T17:17:52Z
|
132
|
+
</updated-at>
|
133
|
+
</release-server>
|
134
|
+
</release-servers></code></pre>
|
135
|
+
</div>
|
136
|
+
<div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>Beanstalk::API::ReleaseServer.find_all_for_environment(7, "repo")</pre></code></div>
|
137
|
+
<h3>Find a single Release Server</h3>
|
138
|
+
<p>To find a server use it’s ID. <var>repository_id</var> is required as well. It’s the number 58 in the example below.</p>
|
139
|
+
<div class="code_container http-request"><i>http-request</i><code class="http-request"><pre>GET /api/58/release_servers/864.xml</pre></code></div>
|
140
|
+
|
141
|
+
<div class="code_container response">
|
142
|
+
<p>Click to expand…</p>
|
143
|
+
<i>http-response</i>
|
144
|
+
<pre><code><?xml version="1.0" encoding="UTF-8"?>
|
145
|
+
<release-server>
|
146
|
+
<account-id type="integer">8723</account-id>
|
147
|
+
<created-at type="datetime">
|
148
|
+
2008-07-24T17:31:13Z
|
149
|
+
</created-at>
|
150
|
+
<id type="integer">864</id>
|
151
|
+
<local-path>/trunk/</local-path>
|
152
|
+
<login>login</login>
|
153
|
+
<name>development</name>
|
154
|
+
<password>password</password>
|
155
|
+
<port type="integer">22</port>
|
156
|
+
<protocol>sftp</protocol>
|
157
|
+
<remote-addr>example.com</remote-addr>
|
158
|
+
<remote-path>/tmp/example/deployment</remote-path>
|
159
|
+
<repository-id type="integer">247843</repository-id>
|
160
|
+
<environment-name>Staging</environment-name>
|
161
|
+
<server-environment-id>6</server-environment-id>
|
162
|
+
<revision type="integer">31</revision>
|
163
|
+
<updated-at type="datetime">
|
164
|
+
2008-10-29T17:17:52Z
|
165
|
+
</updated-at>
|
166
|
+
</release-server></code></pre>
|
167
|
+
</div>
|
168
|
+
<div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>Beanstalk::API::ReleaseServer.find_for_repository(
|
169
|
+
"development", "repo"
|
170
|
+
)</pre></code></div>
|
171
|
+
<h3>Create a Release Server</h3>
|
172
|
+
<p>See the list of writable attributes at the top of the page. All attributes are required for creation.</p>
|
173
|
+
<div class="code_container http-request"><i>http-request</i><code class="http-request"><pre>POST /api/58/release_servers.xml?environment_id=6
|
174
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
175
|
+
<release_server>
|
176
|
+
<name>development</name>
|
177
|
+
<local_path>/trunk</local_path>
|
178
|
+
<remote_path>/var/www/my_site</remote_path>
|
179
|
+
<remote_addr>myftpserver.com</remote_addr>
|
180
|
+
<protocol>ftp</protocol>
|
181
|
+
<port>21</port>
|
182
|
+
<login>username</login>
|
183
|
+
<password>topsecret</password>
|
184
|
+
</release_server>
|
185
|
+
</pre></code></div>
|
186
|
+
<div class="code_container response">
|
187
|
+
<p>Click to expand…</p>
|
188
|
+
<i>http-response</i>
|
189
|
+
<pre><code><?xml version="1.0" encoding="UTF-8"?>
|
190
|
+
<release-server>
|
191
|
+
<account-id type="integer">8723</account-id>
|
192
|
+
<created-at type="datetime">
|
193
|
+
2008-07-24T17:31:13Z
|
194
|
+
</created-at>
|
195
|
+
<id type="integer">864</id>
|
196
|
+
<local-path>/trunk/</local-path>
|
197
|
+
<login>login</login>
|
198
|
+
<name>development</name>
|
199
|
+
<password>password</password>
|
200
|
+
<port type="integer">22</port>
|
201
|
+
<protocol>sftp</protocol>
|
202
|
+
<remote-addr>example.com</remote-addr>
|
203
|
+
<remote-path>/tmp/example/deployment</remote-path>
|
204
|
+
<repository-id type="integer">247843</repository-id>
|
205
|
+
<environment-name>Staging</environment-name>
|
206
|
+
<server-environment-id>6</server-environment-id>
|
207
|
+
<revision type="integer">31</revision>
|
208
|
+
<updated-at type="datetime">
|
209
|
+
2008-10-29T17:17:52Z
|
210
|
+
</updated-at>
|
211
|
+
</release-server>
|
212
|
+
|
213
|
+
--OR IF INVALID--
|
214
|
+
|
215
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
216
|
+
<errors>
|
217
|
+
<error>Remote path can't be blank</error>
|
218
|
+
</errors></code></pre>
|
219
|
+
</div>
|
220
|
+
<div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>server = Beanstalk::API::ReleaseServer.new(
|
221
|
+
:name => "development",
|
222
|
+
:local_path => "/trunk",
|
223
|
+
:remote_path => "/var/www/my_site",
|
224
|
+
:remote_addr => "myftpserver.com",
|
225
|
+
:protocol => "ftp",
|
226
|
+
:port => 21,
|
227
|
+
:login => "username",
|
228
|
+
:password => "topsecret"
|
229
|
+
)
|
230
|
+
server.prefix_options = { :repository_id => 15, :environment_id => 6}
|
231
|
+
server.save
|
232
|
+
</pre></code></div>
|
233
|
+
<h3>Update existing Release Server</h3>
|
234
|
+
<p>See the list of writable attributes at the top of the page. You only need to pass the attributes that you want to change.</p>
|
235
|
+
<div class="code_container http-request"><i>http-request</i><code class="http-request"><pre>PUT /api/58/release_servers/864.xml
|
236
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
237
|
+
<release_server>
|
238
|
+
<port>22</port>
|
239
|
+
</release_server>
|
240
|
+
</pre></code></div>
|
241
|
+
<div class="code_container response">
|
242
|
+
<p>Click to expand…</p>
|
243
|
+
<i>http-response</i>
|
244
|
+
<pre><code>HEAD 200 OK
|
245
|
+
|
246
|
+
--OR IF INVALID--
|
247
|
+
|
248
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
249
|
+
<errors>
|
250
|
+
<error>Remote path can't be blank</error>
|
251
|
+
</errors></code></pre>
|
252
|
+
</div>
|
253
|
+
<p>Or using the ruby lib:</p>
|
254
|
+
<div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>s = Beanstalk::API::ReleaseServer.find_for_repository(
|
255
|
+
10, "repo_name"
|
256
|
+
)
|
257
|
+
s.port = 22
|
258
|
+
s.save
|
259
|
+
</pre></code></div>
|
260
|
+
</section>
|
261
|
+
|
262
|
+
<section id="sidebar">
|
263
|
+
<ul class="tabs">
|
264
|
+
<li>
|
265
|
+
|
266
|
+
<a href="introduction.html">Introduction</a>
|
267
|
+
</li>
|
268
|
+
<li>
|
269
|
+
|
270
|
+
<a href="changelog.html">Changelog</a>
|
271
|
+
</li>
|
272
|
+
<li>
|
273
|
+
|
274
|
+
<a href="ruby_gem.html">Ruby Gem</a>
|
275
|
+
</li>
|
276
|
+
<li>
|
277
|
+
|
278
|
+
<a href="account.html">Account</a>
|
279
|
+
</li>
|
280
|
+
<li>
|
281
|
+
|
282
|
+
<a href="user.html">User</a>
|
283
|
+
</li>
|
284
|
+
<li>
|
285
|
+
|
286
|
+
<a href="repository.html">Repository</a>
|
287
|
+
</li>
|
288
|
+
<li>
|
289
|
+
|
290
|
+
<a href="changeset.html">Changeset</a>
|
291
|
+
</li>
|
292
|
+
<li>
|
293
|
+
|
294
|
+
<a href="comment.html">Comment</a>
|
295
|
+
</li>
|
296
|
+
<li>
|
297
|
+
|
298
|
+
<a href="server_environment.html">Server Environment</a>
|
299
|
+
</li>
|
300
|
+
<li>
|
301
|
+
|
302
|
+
<strong>→ Release Server</strong>
|
303
|
+
</li>
|
304
|
+
<li>
|
305
|
+
|
306
|
+
<a href="release.html">Release</a>
|
307
|
+
</li>
|
308
|
+
</ul>
|
309
|
+
</section>
|
310
|
+
</div>
|
311
|
+
</div>
|
312
|
+
|
313
|
+
<footer>
|
314
|
+
|
315
|
+
<div class="container">
|
316
|
+
<ul>
|
317
|
+
<li><a href="http://help.beanstalkapp.com/discussion/new">Contact</a></li>
|
318
|
+
<li><a href="http://blog.beanstalkapp.com">Blog</a></li>
|
319
|
+
<li><a href="http://twitter.com/beanstalkapp">Twitter</a></li>
|
320
|
+
<li><a href="http://beanstalkapp.com/security">Security</a></li>
|
321
|
+
<li><a href="http://beanstalkapp.com/privacy-policy">Privacy Policy</a></li>
|
322
|
+
<li><a href="http://beanstalkapp.com/terms-of-service">Terms of Service</a></li>
|
323
|
+
</ul>
|
324
|
+
<p>© <a href="http://wildbit.com/">Wildbit, <abbr>LLC</abbr></a>, 2010. All rights reserved. The Beanstalk logo and name are trademarks of Wildbit, <abbr>LLC</abbr>.</p>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
</footer>
|
328
|
+
|
329
|
+
<script type="text/javascript">
|
330
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
331
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
332
|
+
</script>
|
333
|
+
<script type="text/javascript">
|
334
|
+
try {
|
335
|
+
var pageTracker = _gat._getTracker("UA-507677-5");
|
336
|
+
pageTracker._setDomainName(".beanstalkapp.com");
|
337
|
+
pageTracker._trackPageview();
|
338
|
+
} catch(err) {}</script>
|
339
|
+
</body>
|
340
|
+
</html>
|