beanstalkapp 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. data/CHANGES.rdoc +4 -0
  2. data/VERSION +1 -1
  3. data/beanstalkapp.gemspec +106 -2
  4. data/doc/account.html +192 -0
  5. data/doc/changelog.html +150 -0
  6. data/doc/changeset.html +256 -0
  7. data/doc/comment.html +299 -0
  8. data/doc/files/javascripts/code-highlighter.js +190 -0
  9. data/doc/files/javascripts/global.js +67 -0
  10. data/doc/files/javascripts/mootools-1.2.4-core-yc.js +357 -0
  11. data/doc/files/stylesheets/global.css +2152 -0
  12. data/doc/files/stylesheets/ie7.css +85 -0
  13. data/doc/images/apple-touch-icon.png +0 -0
  14. data/doc/images/b-search.gif +0 -0
  15. data/doc/images/b-submit.gif +0 -0
  16. data/doc/images/b-tour.png +0 -0
  17. data/doc/images/bg-comments-count.png +0 -0
  18. data/doc/images/bg-corners.png +0 -0
  19. data/doc/images/bg-header-pattern-alt.png +0 -0
  20. data/doc/images/bg-header-pattern.png +0 -0
  21. data/doc/images/bg-header.png +0 -0
  22. data/doc/images/bg-input.png +0 -0
  23. data/doc/images/bg-page-pattern-alt.png +0 -0
  24. data/doc/images/bg-page-pattern.png +0 -0
  25. data/doc/images/bg-plans.png +0 -0
  26. data/doc/images/bg-ref-basecamp.gif +0 -0
  27. data/doc/images/bg-ref-lighthouse.gif +0 -0
  28. data/doc/images/bg-ref-rackspace.gif +0 -0
  29. data/doc/images/bg-ref-versions.gif +0 -0
  30. data/doc/images/bg-referrer.png +0 -0
  31. data/doc/images/bg-screenshot.png +0 -0
  32. data/doc/images/bg-tooltip.png +0 -0
  33. data/doc/images/button.png +0 -0
  34. data/doc/images/customers/blueflavor.png +0 -0
  35. data/doc/images/customers/brightcove.png +0 -0
  36. data/doc/images/customers/flipshake-s.png +0 -0
  37. data/doc/images/customers/flipshake.png +0 -0
  38. data/doc/images/customers/helloenjoy-s.png +0 -0
  39. data/doc/images/customers/helloenjoy.png +0 -0
  40. data/doc/images/customers/netmagazine.jpg +0 -0
  41. data/doc/images/customers/newrelic.png +0 -0
  42. data/doc/images/customers/puma.png +0 -0
  43. data/doc/images/customers/realmac-s.png +0 -0
  44. data/doc/images/customers/realmac.png +0 -0
  45. data/doc/images/customers/scrapblog.png +0 -0
  46. data/doc/images/customers/store74.gif +0 -0
  47. data/doc/images/customers/theappleblog.jpg +0 -0
  48. data/doc/images/customers/tuaw.jpg +0 -0
  49. data/doc/images/customers/vzaar-s.png +0 -0
  50. data/doc/images/customers/vzaar.png +0 -0
  51. data/doc/images/customers/wufoo-s.png +0 -0
  52. data/doc/images/customers/wufoo.png +0 -0
  53. data/doc/images/favicon.ico +0 -0
  54. data/doc/images/i-arrow.png +0 -0
  55. data/doc/images/i-cc.png +0 -0
  56. data/doc/images/i-checkmark.png +0 -0
  57. data/doc/images/i-features.png +0 -0
  58. data/doc/images/i-help.png +0 -0
  59. data/doc/images/i-input-email.png +0 -0
  60. data/doc/images/i-input-password.png +0 -0
  61. data/doc/images/i-leaf.png +0 -0
  62. data/doc/images/i-lock-sml.png +0 -0
  63. data/doc/images/i-rss.png +0 -0
  64. data/doc/images/i-tour-help.png +0 -0
  65. data/doc/images/logo-rackspace.gif +0 -0
  66. data/doc/images/logo-sml.png +0 -0
  67. data/doc/images/logo-wildbit.png +0 -0
  68. data/doc/images/logo.png +0 -0
  69. data/doc/images/logos/basecamp-ref.png +0 -0
  70. data/doc/images/logos/basecamp.png +0 -0
  71. data/doc/images/logos/campfire.png +0 -0
  72. data/doc/images/logos/cloudscaling.png +0 -0
  73. data/doc/images/logos/collabnet.gif +0 -0
  74. data/doc/images/logos/dynect.png +0 -0
  75. data/doc/images/logos/fogbugz.png +0 -0
  76. data/doc/images/logos/freckle.png +0 -0
  77. data/doc/images/logos/harvest-ref.gif +0 -0
  78. data/doc/images/logos/harvest.png +0 -0
  79. data/doc/images/logos/lighthouse-ref.png +0 -0
  80. data/doc/images/logos/lighthouse.png +0 -0
  81. data/doc/images/logos/pixelnovel.png +0 -0
  82. data/doc/images/logos/rackspace-ref.gif +0 -0
  83. data/doc/images/logos/rackspace.gif +0 -0
  84. data/doc/images/logos/rackspace.png +0 -0
  85. data/doc/images/logos/splunk-s.png +0 -0
  86. data/doc/images/logos/splunk.png +0 -0
  87. data/doc/images/logos/teamsupport.png +0 -0
  88. data/doc/images/logos/twitter.png +0 -0
  89. data/doc/images/logos/versions-ref.gif +0 -0
  90. data/doc/images/logos/versions.png +0 -0
  91. data/doc/images/promo-screenshots.png +0 -0
  92. data/doc/images/sep-promo.png +0 -0
  93. data/doc/images/ss-browse.png +0 -0
  94. data/doc/images/ss-changeset.png +0 -0
  95. data/doc/images/ss-dashboard.png +0 -0
  96. data/doc/images/ss-integrations.png +0 -0
  97. data/doc/images/ss-releases.png +0 -0
  98. data/doc/images/ss-repositories.png +0 -0
  99. data/doc/images/ss-signup-motivator.jpg +0 -0
  100. data/doc/introduction.html +152 -0
  101. data/doc/rails_plugin.html +141 -0
  102. data/doc/release.html +282 -0
  103. data/doc/release_server.html +340 -0
  104. data/doc/repository.html +326 -0
  105. data/doc/ruby_gem.html +160 -0
  106. data/doc/server_environment.html +270 -0
  107. data/doc/user.html +210 -0
  108. data/lib/beanstalkapp/release.rb +6 -2
  109. data/test/integration.rb +11 -3
  110. metadata +106 -2
@@ -0,0 +1,282 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>Beanstalk &mdash; 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 &amp; 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 &amp; 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&hellip;</p>
74
+ <i>http-response</i>
75
+ <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
76
+ &lt;releases type=&quot;array&quot;&gt;
77
+ &lt;release&gt;
78
+ &lt;account-id type=&quot;integer&quot;&gt;23452&lt;/account-id&gt;
79
+ &lt;author&gt;gilbert&lt;/author&gt;
80
+ &lt;comment&gt;Deploying yesterday's changes.&lt;/comment&gt;
81
+ &lt;created-at type=&quot;datetime&quot;&gt;
82
+ 2009-11-04T10:03:29Z
83
+ &lt;/created-at&gt;
84
+ &lt;deployed-at type=&quot;datetime&quot;&gt;
85
+ 2009-11-04T10:03:40Z
86
+ &lt;/deployed-at&gt;
87
+ &lt;id type=&quot;integer&quot;&gt;2547&lt;/id&gt;
88
+ &lt;last-retry-at type=&quot;datetime&quot; nil=&quot;true&quot;&gt;&lt;/last-retry-at&gt;
89
+ &lt;repository-id type=&quot;integer&quot;&gt;98765&lt;/repository-id&gt;
90
+ &lt;environment-name&gt;Staging&lt;/environment-name&gt;
91
+ &lt;environment-id&gt;6&lt;/environment-id&gt;
92
+ &lt;retries type=&quot;integer&quot;&gt;0&lt;/retries&gt;
93
+ &lt;revision type=&quot;integer&quot;&gt;81&lt;/revision&gt;
94
+ &lt;state&gt;complete&lt;/state&gt;
95
+ &lt;updated-at type=&quot;datetime&quot;&gt;
96
+ 2009-11-04T10:03:40Z
97
+ &lt;/updated-at&gt;
98
+ &lt;/release&gt;
99
+ &lt;release&gt;
100
+ &lt;account-id type=&quot;integer&quot;&gt;8765&lt;/account-id&gt;
101
+ &lt;author&gt;ilya&lt;/author&gt;
102
+ &lt;comment&gt;Going crazy&lt;/comment&gt;
103
+ &lt;created-at type=&quot;datetime&quot;&gt;
104
+ 2008-06-26T17:02:22Z
105
+ &lt;/created-at&gt;
106
+ &lt;deployed-at type=&quot;datetime&quot;&gt;
107
+ 2008-06-26T17:03:30Z
108
+ &lt;/deployed-at&gt;
109
+ &lt;id type=&quot;integer&quot;&gt;6543&lt;/id&gt;
110
+ &lt;last-retry-at type=&quot;datetime&quot; nil=&quot;true&quot;&gt;&lt;/last-retry-at&gt;
111
+ &lt;repository-id type=&quot;integer&quot;&gt;8967&lt;/repository-id&gt;
112
+ &lt;environment-name&gt;Staging&lt;/environment-name&gt;
113
+ &lt;environment-id&gt;6&lt;/environment-id&gt;
114
+ &lt;retries type=&quot;integer&quot;&gt;0&lt;/retries&gt;
115
+ &lt;revision type=&quot;integer&quot;&gt;249&lt;/revision&gt;
116
+ &lt;state&gt;complete&lt;/state&gt;
117
+ &lt;updated-at type=&quot;datetime&quot;&gt;
118
+ 2008-11-04T14:50:01Z
119
+ &lt;/updated-at&gt;
120
+ &lt;/release&gt;
121
+ &lt;/releases&gt;</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, &quot;repo&quot;, 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&hellip;</p>
129
+ <i>http-response</i>
130
+ <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
131
+ &lt;release&gt;
132
+ &lt;account-id type=&quot;integer&quot;&gt;8765&lt;/account-id&gt;
133
+ &lt;author&gt;ilya&lt;/author&gt;
134
+ &lt;comment&gt;Going crazy&lt;/comment&gt;
135
+ &lt;created-at type=&quot;datetime&quot;&gt;
136
+ 2008-06-26T17:02:22Z
137
+ &lt;/created-at&gt;
138
+ &lt;deployed-at type=&quot;datetime&quot;&gt;
139
+ 2008-06-26T17:03:30Z
140
+ &lt;/deployed-at&gt;
141
+ &lt;id type=&quot;integer&quot;&gt;6543&lt;/id&gt;
142
+ &lt;last-retry-at type=&quot;datetime&quot; nil=&quot;true&quot;&gt;&lt;/last-retry-at&gt;
143
+ &lt;repository-id type=&quot;integer&quot;&gt;8967&lt;/repository-id&gt;
144
+ &lt;environment-name&gt;Staging&lt;/environment-name&gt;
145
+ &lt;environment-id&gt;6&lt;/environment-id&gt;
146
+ &lt;retries type=&quot;integer&quot;&gt;0&lt;/retries&gt;
147
+ &lt;revision type=&quot;integer&quot;&gt;249&lt;/revision&gt;
148
+ &lt;state&gt;complete&lt;/state&gt;
149
+ &lt;updated-at type=&quot;datetime&quot;&gt;
150
+ 2008-11-04T14:50:01Z
151
+ &lt;/updated-at&gt;
152
+ &lt;/release&gt;</code></pre>
153
+ </div>
154
+ <div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>Beanstalk::API::Release.find_for_repository(8765, &quot;repo&quot;)</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
+ &lt;release&gt;
160
+ &lt;revision type=&quot;integer&quot;&gt;1&lt;/revision&gt;
161
+ &lt;/release&gt;
162
+ </pre></code></div>
163
+ <div class="code_container response">
164
+ <p>Click to expand&hellip;</p>
165
+ <i>http-response</i>
166
+ <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
167
+ &lt;release&gt;
168
+ &lt;account-id type=&quot;integer&quot;&gt;23452&lt;/account-id&gt;
169
+ &lt;author&gt;gilbert&lt;/author&gt;
170
+ &lt;comment&gt;Deploying yesterday's changes.&lt;/comment&gt;
171
+ &lt;created-at type=&quot;datetime&quot;&gt;
172
+ 2009-11-04T10:03:29Z
173
+ &lt;/created-at&gt;
174
+ &lt;deployed-at type=&quot;datetime&quot;&gt;
175
+ 2009-11-04T10:03:40Z
176
+ &lt;/deployed-at&gt;
177
+ &lt;id type=&quot;integer&quot;&gt;2547&lt;/id&gt;
178
+ &lt;last-retry-at type=&quot;datetime&quot; nil=&quot;true&quot;&gt;&lt;/last-retry-at&gt;
179
+ &lt;repository-id type=&quot;integer&quot;&gt;98765&lt;/repository-id&gt;
180
+ &lt;environment-name&gt;Staging&lt;/environment-name&gt;
181
+ &lt;environment-id&gt;6&lt;/environment-id&gt;
182
+ &lt;retries type=&quot;integer&quot;&gt;0&lt;/retries&gt;
183
+ &lt;revision type=&quot;integer&quot;&gt;81&lt;/revision&gt;
184
+ &lt;state&gt;complete&lt;/state&gt;
185
+ &lt;updated-at type=&quot;datetime&quot;&gt;
186
+ 2009-11-04T10:03:40Z
187
+ &lt;/updated-at&gt;
188
+ &lt;/release&gt;
189
+
190
+ --OR IF INVALID--
191
+
192
+ &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
193
+ &lt;errors&gt;
194
+ &lt;error&gt;Server can't be blank&lt;/error&gt;
195
+ &lt;/errors&gt;</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 =&gt; 58, :environment_id =&gt; 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>&rarr; 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>&copy; <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 &mdash; 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 &amp; 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 &amp; 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 &#8220;web hooks&#8221; 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> — &#8220;ftp&#8221; or &#8220;sftp&#8221;;</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> — &#8220;true&#8221; or &#8220;false&#8221;;</li>
72
+ <li><var>authenticate_by_key</var> — &#8220;true&#8221; or &#8220;false&#8221;. For <span class="caps">SFTP</span> servers only, will try to authenticate using <a href="http://anything.beanstalkapp.com/beanstalk_rsa.pub">Beanstalk&#8217;s public key</a>;</li>
73
+ <li><var>use_feat</var> — &#8220;true&#8221; or &#8220;false&#8221;;</li>
74
+ <li><var>pre_release_hook</var> — &#8220;http://yourhost.com/yourhook.php&#8221;. <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> — &#8220;http://yourhost.com/yourhook.php&#8221;. <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&#8217;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&hellip;</p>
86
+ <i>http-response</i>
87
+ <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
88
+ &lt;release-servers type=&quot;array&quot;&gt;
89
+ &lt;release-server&gt;
90
+ &lt;account-id type=&quot;integer&quot;&gt;8723&lt;/account-id&gt;
91
+ &lt;automatic type=&quot;boolean&quot;&gt;false&lt;/automatic&gt;
92
+ &lt;created-at type=&quot;datetime&quot;&gt;
93
+ 2008-07-24T17:31:13Z
94
+ &lt;/created-at&gt;
95
+ &lt;id type=&quot;integer&quot;&gt;864&lt;/id&gt;
96
+ &lt;local-path&gt;/trunk/&lt;/local-path&gt;
97
+ &lt;login&gt;login&lt;/login&gt;
98
+ &lt;name&gt;development&lt;/name&gt;
99
+ &lt;password&gt;password&lt;/password&gt;
100
+ &lt;port type=&quot;integer&quot;&gt;22&lt;/port&gt;
101
+ &lt;protocol&gt;sftp&lt;/protocol&gt;
102
+ &lt;remote-addr&gt;example.com&lt;/remote-addr&gt;
103
+ &lt;remote-path&gt;/tmp/example/deployment&lt;/remote-path&gt;
104
+ &lt;repository-id type=&quot;integer&quot;&gt;247843&lt;/repository-id&gt;
105
+ &lt;environment-name&gt;Staging&lt;/environment-name&gt;
106
+ &lt;server-environment-id&gt;6&lt;/server-environment-id&gt;
107
+ &lt;revision type=&quot;integer&quot;&gt;31&lt;/revision&gt;
108
+ &lt;updated-at type=&quot;datetime&quot;&gt;
109
+ 2008-10-29T17:17:52Z
110
+ &lt;/updated-at&gt;
111
+ &lt;/release-server&gt;
112
+ &lt;release-server&gt;
113
+ &lt;account-id type=&quot;integer&quot;&gt;96125&lt;/account-id&gt;
114
+ &lt;created-at type=&quot;datetime&quot;&gt;
115
+ 2008-07-23T20:44:55Z
116
+ &lt;/created-at&gt;
117
+ &lt;id type=&quot;integer&quot;&gt;235&lt;/id&gt;
118
+ &lt;local-path&gt;/var/www/site&lt;/local-path&gt;
119
+ &lt;login&gt;login&lt;/login&gt;
120
+ &lt;name&gt;development&lt;/name&gt;
121
+ &lt;password&gt;password&lt;/password&gt;
122
+ &lt;port type=&quot;integer&quot;&gt;21&lt;/port&gt;
123
+ &lt;protocol&gt;ftp&lt;/protocol&gt;
124
+ &lt;remote-addr&gt;ftp.example.com&lt;/remote-addr&gt;
125
+ &lt;remote-path&gt;/&lt;/remote-path&gt;
126
+ &lt;repository-id type=&quot;integer&quot;&gt;73451&lt;/repository-id&gt;
127
+ &lt;environment-name&gt;Staging&lt;/environment-name&gt;
128
+ &lt;server-environment-id&gt;6&lt;/server-environment-id&gt;
129
+ &lt;revision type=&quot;integer&quot;&gt;0&lt;/revision&gt;
130
+ &lt;updated-at type=&quot;datetime&quot;&gt;
131
+ 2008-10-29T17:17:52Z
132
+ &lt;/updated-at&gt;
133
+ &lt;/release-server&gt;
134
+ &lt;/release-servers&gt;</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, &quot;repo&quot;)</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&hellip;</p>
143
+ <i>http-response</i>
144
+ <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
145
+ &lt;release-server&gt;
146
+ &lt;account-id type=&quot;integer&quot;&gt;8723&lt;/account-id&gt;
147
+ &lt;created-at type=&quot;datetime&quot;&gt;
148
+ 2008-07-24T17:31:13Z
149
+ &lt;/created-at&gt;
150
+ &lt;id type=&quot;integer&quot;&gt;864&lt;/id&gt;
151
+ &lt;local-path&gt;/trunk/&lt;/local-path&gt;
152
+ &lt;login&gt;login&lt;/login&gt;
153
+ &lt;name&gt;development&lt;/name&gt;
154
+ &lt;password&gt;password&lt;/password&gt;
155
+ &lt;port type=&quot;integer&quot;&gt;22&lt;/port&gt;
156
+ &lt;protocol&gt;sftp&lt;/protocol&gt;
157
+ &lt;remote-addr&gt;example.com&lt;/remote-addr&gt;
158
+ &lt;remote-path&gt;/tmp/example/deployment&lt;/remote-path&gt;
159
+ &lt;repository-id type=&quot;integer&quot;&gt;247843&lt;/repository-id&gt;
160
+ &lt;environment-name&gt;Staging&lt;/environment-name&gt;
161
+ &lt;server-environment-id&gt;6&lt;/server-environment-id&gt;
162
+ &lt;revision type=&quot;integer&quot;&gt;31&lt;/revision&gt;
163
+ &lt;updated-at type=&quot;datetime&quot;&gt;
164
+ 2008-10-29T17:17:52Z
165
+ &lt;/updated-at&gt;
166
+ &lt;/release-server&gt;</code></pre>
167
+ </div>
168
+ <div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>Beanstalk::API::ReleaseServer.find_for_repository(
169
+ &quot;development&quot;, &quot;repo&quot;
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
+ &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
175
+ &lt;release_server&gt;
176
+ &lt;name&gt;development&lt;/name&gt;
177
+ &lt;local_path&gt;/trunk&lt;/local_path&gt;
178
+ &lt;remote_path&gt;/var/www/my_site&lt;/remote_path&gt;
179
+ &lt;remote_addr&gt;myftpserver.com&lt;/remote_addr&gt;
180
+ &lt;protocol&gt;ftp&lt;/protocol&gt;
181
+ &lt;port&gt;21&lt;/port&gt;
182
+ &lt;login&gt;username&lt;/login&gt;
183
+ &lt;password&gt;topsecret&lt;/password&gt;
184
+ &lt;/release_server&gt;
185
+ </pre></code></div>
186
+ <div class="code_container response">
187
+ <p>Click to expand&hellip;</p>
188
+ <i>http-response</i>
189
+ <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
190
+ &lt;release-server&gt;
191
+ &lt;account-id type=&quot;integer&quot;&gt;8723&lt;/account-id&gt;
192
+ &lt;created-at type=&quot;datetime&quot;&gt;
193
+ 2008-07-24T17:31:13Z
194
+ &lt;/created-at&gt;
195
+ &lt;id type=&quot;integer&quot;&gt;864&lt;/id&gt;
196
+ &lt;local-path&gt;/trunk/&lt;/local-path&gt;
197
+ &lt;login&gt;login&lt;/login&gt;
198
+ &lt;name&gt;development&lt;/name&gt;
199
+ &lt;password&gt;password&lt;/password&gt;
200
+ &lt;port type=&quot;integer&quot;&gt;22&lt;/port&gt;
201
+ &lt;protocol&gt;sftp&lt;/protocol&gt;
202
+ &lt;remote-addr&gt;example.com&lt;/remote-addr&gt;
203
+ &lt;remote-path&gt;/tmp/example/deployment&lt;/remote-path&gt;
204
+ &lt;repository-id type=&quot;integer&quot;&gt;247843&lt;/repository-id&gt;
205
+ &lt;environment-name&gt;Staging&lt;/environment-name&gt;
206
+ &lt;server-environment-id&gt;6&lt;/server-environment-id&gt;
207
+ &lt;revision type=&quot;integer&quot;&gt;31&lt;/revision&gt;
208
+ &lt;updated-at type=&quot;datetime&quot;&gt;
209
+ 2008-10-29T17:17:52Z
210
+ &lt;/updated-at&gt;
211
+ &lt;/release-server&gt;
212
+
213
+ --OR IF INVALID--
214
+
215
+ &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
216
+ &lt;errors&gt;
217
+ &lt;error&gt;Remote path can't be blank&lt;/error&gt;
218
+ &lt;/errors&gt;</code></pre>
219
+ </div>
220
+ <div class="code_container ruby"><i>ruby</i><code class="ruby"><pre>server = Beanstalk::API::ReleaseServer.new(
221
+ :name =&gt; &quot;development&quot;,
222
+ :local_path =&gt; &quot;/trunk&quot;,
223
+ :remote_path =&gt; &quot;/var/www/my_site&quot;,
224
+ :remote_addr =&gt; &quot;myftpserver.com&quot;,
225
+ :protocol =&gt; &quot;ftp&quot;,
226
+ :port =&gt; 21,
227
+ :login =&gt; &quot;username&quot;,
228
+ :password =&gt; &quot;topsecret&quot;
229
+ )
230
+ server.prefix_options = { :repository_id =&gt; 15, :environment_id =&gt; 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
+ &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
237
+ &lt;release_server&gt;
238
+ &lt;port&gt;22&lt;/port&gt;
239
+ &lt;/release_server&gt;
240
+ </pre></code></div>
241
+ <div class="code_container response">
242
+ <p>Click to expand&hellip;</p>
243
+ <i>http-response</i>
244
+ <pre><code>HEAD 200 OK
245
+
246
+ --OR IF INVALID--
247
+
248
+ &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
249
+ &lt;errors&gt;
250
+ &lt;error&gt;Remote path can't be blank&lt;/error&gt;
251
+ &lt;/errors&gt;</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, &quot;repo_name&quot;
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>&rarr; 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>&copy; <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>