-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
746 lines (736 loc) · 28.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
<!DOCTYPE html>
<html>
<head>
<title>Integrity | Continuous Integration server</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href=integrity.css rel=stylesheet type="text/css">
</head>
<body>
<p><a href="http://github.com/integrity/integrity">
<img style="position: absolute; top: 0; right: 0; border: 0;"
src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
alt="Fork me on GitHub" /></a></p>
<div id=header>
<h1><a href="/">Integrity</a></h1>
<p>Continuous Integration server</p>
</div>
<div id=content>
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>As soon as you push your commits, Integrity builds your code, run your tests
and makes sure everything works fine. It then reports the build status using
various notifiers back to you and your team so everyone is on the same page
and problems can be fixed right away.</p></div>
<div class="paragraph"><p>Check out Integrity watching itself:</p></div>
<div class="paragraph"><p><span class="image">
<img src="screenshot.png" alt="Screenshot" />
</span></p></div>
<div class="paragraph"><p>Read more about about Continuous Integration on
<a href="http://martinfowler.com/articles/continuousIntegration.html">Martin Fowler’s
website</a> and <a href="http://en.wikipedia.org/wiki/Continuous_Integration">Wikipedia</a>.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_installation">Installation</h2>
<div class="sectionbody">
<div class="paragraph"><p>Make sure your system meet these prerequisites:</p></div>
<div class="ulist"><ul>
<li>
<p>
Ruby >= 1.8.7 (1.8.7, 1.9.2, 1.9.3 and 2.0.0 should work)
</p>
</li>
<li>
<p>
RubyGems >= 1.3.5
</p>
</li>
<li>
<p>
git >= 1.6
</p>
</li>
</ul></div>
<div class="paragraph"><p>Then grab Integrity via git, install its dependencies and create the database:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>$ gem install bundler
$ git clone git<span style="color: #990000">:</span>//github<span style="color: #990000">.</span>com/integrity/integrity
$ cd integrity
$ git checkout -b deploy v26
$ bundle install
$ bundle <span style="font-weight: bold"><span style="color: #0000FF">exec</span></span> rake db</tt></pre></div></div>
<div class="paragraph"><p>To give it a quick try before going any further, run <code>bundle exec rackup</code> and
navigate to <a href="http://0.0.0.0:9292">http://0.0.0.0:9292</a>.</p></div>
<div class="paragraph"><p>Upgrade:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>$ git fetch origin
$ git merge v26</tt></pre></div></div>
</div>
</div>
<div class="sect1">
<h2 id="_configuration">Configuration</h2>
<div class="sectionbody">
<div class="paragraph"><p>Integrity is configured via the <code>init.rb</code> file using Ruby.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>Integrity<span style="color: #990000">.</span>configure <span style="font-weight: bold"><span style="color: #0000FF">do</span></span> <span style="color: #990000">|</span>c<span style="color: #990000">|</span>
c<span style="color: #990000">.</span>database <span style="color: #990000">=</span> <span style="color: #FF0000">"sqlite3:integrity.db"</span>
c<span style="color: #990000">.</span>directory <span style="color: #990000">=</span> <span style="color: #FF0000">"builds"</span>
c<span style="color: #990000">.</span>base_url <span style="color: #990000">=</span> <span style="color: #FF0000">"http://ci.example.org"</span>
c<span style="color: #990000">.</span>log <span style="color: #990000">=</span> <span style="color: #FF0000">"integrity.log"</span>
c<span style="color: #990000">.</span>builder <span style="color: #990000">=</span> <span style="color: #990000">:</span>threaded<span style="color: #990000">,</span> <span style="color: #993399">5</span>
c<span style="color: #990000">.</span>build_all <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span>
c<span style="color: #990000">.</span>project_default_build_count <span style="color: #990000">=</span> <span style="color: #993399">10</span>
<span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre></div></div>
<div class="sect2">
<h3 id="_basic_settings">Basic settings</h3>
<div class="dlist"><dl>
<dt class="hdlist1">
database
</dt>
<dd>
<p>
Any valid database URI supported by
<a href="http://datamapper.org/">DataMapper</a>.
</p>
<div class="ulist"><ul>
<li>
<p>
<code>sqlite3:integrity.db</code>
</p>
</li>
<li>
<p>
<code>mysql://user:password@localhost/integrity</code>
</p>
</li>
<li>
<p>
<code>postgres://user:password@localhost/integrity</code>
</p>
</li>
</ul></div>
</dd>
</dl></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Important</div>
</td>
<td class="content">You need to install the appropriate <code>data_objects</code> adapter as well.
The SQLite3 adapter (<code>do_sqlite3</code>) is installed by default.</td>
</tr></table>
</div>
<div class="dlist"><dl>
<dt class="hdlist1">
directory
</dt>
<dd>
<p>
This is where your projects' code will be checked out. Make sure it
is writable by the user who runs Integrity.
</p>
</dd>
<dt class="hdlist1">
base_url
</dt>
<dd>
<p>
Absolute URL to your Integrity instance, <strong>without</strong> a trailing slash.
This setting is optional but is required to have proper links in notifications.
</p>
</dd>
<dt class="hdlist1">
log
</dt>
<dd>
<p>
Path to the Integrity log file; mostly useful for troubleshooting
</p>
</dd>
<dt class="hdlist1">
build_all!
</dt>
<dd>
<p>
Tells Integrity to build every single commit it is notified about.
Only builds the newest otherwise.
</p>
</dd>
<dt class="hdlist1">
auto_branch!
</dt>
<dd>
<p>
Say the project <em>Integrity</em> is tracking the master branch, and
I push my <em>build-duration</em> topic branch to GitHub, Integrity will create and
build a new project named <em>Integrity (build-duration)</em> using the same build
command and notifiers.
</p>
</dd>
<dt class="hdlist1">
trim_branches
</dt>
<dd>
<p>
When <em>Integrity</em> is set to auto branch, it is possible for a
large number of stale branches to stick around which no longer exist. Turning
this on will automatically detect when a branch is deleted via the GitHub
post-receive hook and delete the build history for the branch.
</p>
</dd>
<dt class="hdlist1">
project_default_build_count
</dt>
<dd>
<p>
How many builds to initially show on project
pages. nil, which is the default, means show all builds.
</p>
</dd>
<dt class="hdlist1">
HTTP authentication
</dt>
<dd>
<p>
If both <code>username</code> and <code>password</code> settings are set then
only the logged-in users can administer the projects and see the private ones.
</p>
</dd>
</dl></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>c<span style="color: #990000">.</span>username <span style="color: #990000">=</span> <span style="color: #FF0000">"admin"</span>
c<span style="color: #990000">.</span>password <span style="color: #990000">=</span> <span style="color: #FF0000">"password"</span></tt></pre></div></div>
<div class="paragraph"><p>To protect the whole Integrity instance, set ADMIN_USERNAME and ADMIN_PASSWORD
environment variables before starting Integrity:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">export</span></span> <span style="color: #009900">ADMIN_USERNAME</span><span style="color: #990000">=</span>admin <span style="color: #009900">ADMIN_PASSWORD</span><span style="color: #990000">=</span>secret</tt></pre></div></div>
<div class="paragraph"><p>On Heroku:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>heroku config<span style="color: #990000">:</span>add <span style="color: #009900">ADMIN_USERNAME</span><span style="color: #990000">=</span>admin <span style="color: #009900">ADMIN_PASSWORD</span><span style="color: #990000">=</span>secret</tt></pre></div></div>
<div class="dlist"><dl>
<dt class="hdlist1">
checkout_proc
</dt>
<dd>
<p>
Set to a Proc instance to override default checkout mechanism.
For example, to use <a href="https://github.com/grahamc/git-cachecow">git-cachecow</a>
to cache repositories locally:
</p>
</dd>
</dl></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>c<span style="color: #990000">.</span>checkout_proc <span style="color: #990000">=</span> Proc<span style="color: #990000">.</span>new <span style="font-weight: bold"><span style="color: #0000FF">do</span></span> <span style="color: #990000">|</span>runner<span style="color: #990000">,</span> repo_uri<span style="color: #990000">,</span> branch<span style="color: #990000">,</span> sha1<span style="color: #990000">,</span> target_directory<span style="color: #990000">|</span>
runner<span style="color: #990000">.</span>run! <span style="color: #FF0000">"git scclone #{repo_uri} #{target_directory} #{sha1}"</span>
<span style="font-weight: bold"><span style="color: #0000FF">end</span></span></tt></pre></div></div>
</div>
<div class="sect2">
<h3 id="_building_private_repositories">Building private repositories</h3>
<div class="paragraph"><p>Integrity will use keys configured in its environment for repository access.</p></div>
<div class="paragraph"><p>The easiest option is to switch to the Unix user that Integrity runs under
and create an SSH key for this user:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>ssh-keygen</tt></pre></div></div>
<div class="paragraph"><p>Save the key to the default location. Add the public key to the list of allowed
keys in the repository you wish to build. Clone the repository manually to
check that it works and trust the server’s host key if necessary.</p></div>
<div class="paragraph"><p>An alternative is to configure <code>GIT_SSH</code> environment variable. Integrity ships
with a sample <code>git_ssh</code> file in <code>doc</code> directory. Path to this file should
be placed in the <code>GIT_SSH</code> environment variable. You can do this on Heroku
by editing <code>init.rb</code> to include the following:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>ENV<span style="color: #990000">[</span><span style="color: #FF0000">'GIT_SSH'</span><span style="color: #990000">]</span> <span style="color: #990000">=</span> File<span style="color: #990000">.</span>join<span style="color: #990000">(</span>File<span style="color: #990000">.</span>dirname<span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">__FILE__</span></span><span style="color: #990000">),</span> <span style="color: #FF0000">'doc/git_ssh'</span><span style="color: #990000">)</span></tt></pre></div></div>
<div class="paragraph"><p>Then, specify a private key that is allowed by repository:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>heroku config<span style="color: #990000">:</span>add <span style="color: #009900">GIT_PRIVATE_KEY</span><span style="color: #990000">=</span><span style="color: #FF0000">"----contents of private key</span>
<span style="color: #FF0000">second line of private key</span>
<span style="color: #FF0000">make sure to use double quotes</span>
<span style="color: #FF0000">to allow multi-line config var value</span>
<span style="color: #FF0000">end of private key-----------"</span></tt></pre></div></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Warning</div>
</td>
<td class="content">Storing secret data such as private keys in environment is inherently
insecure. If you do this, restrict access to your Integrity
installation to trusted users only.</td>
</tr></table>
</div>
</div>
<div class="sect2">
<h3 id="_automating_the_builds">Automating the builds</h3>
<div class="paragraph"><p>Integrity provides two HTTP endpoints to trigger new builds:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
POST /:project/builds
</dt>
<dd>
<p>
Causes Integrity to fetch the HEAD of the remote
repository and build it. Note that HTTP authentication applies to it if set.
This endpoint can’t be disabled.
</p>
</dd>
<dt class="hdlist1">
POST /github/:token
</dt>
<dd>
<p>
Supports GitHub’s
<a href="https://help.github.com/articles/post-receive-hooks">Post-Receive Hook</a>. Enable it:
</p>
</dd>
</dl></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>c<span style="color: #990000">.</span>github_token <span style="color: #990000">=</span> <span style="color: #FF0000">"TOKEN"</span></tt></pre></div></div>
</div>
<div class="sect2">
<h3 id="_choosing_a_builder">Choosing a builder</h3>
<div class="paragraph"><p>Integrity ships with three ways of building your codes in the background.</p></div>
<div class="sect3">
<h4 id="_threaded">Threaded</h4>
<div class="paragraph"><p>The <code>threaded</code> builder pushes the build job to an in-memory queue and processes
them as soon as possible. It relies on Ruby’s thread so it doesn’t have any
dependency nor requires to run other processes.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>c<span style="color: #990000">.</span>builder <span style="color: #990000">=</span> <span style="color: #990000">:</span>threaded<span style="color: #990000">,</span> <span style="color: #993399">5</span></tt></pre></div></div>
<div class="paragraph"><p>The second argument is the size of the thread pool.</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">The threaded builder
<a href="https://github.com/integrity/integrity/issues/156">cannot be used
with Passenger</a>.</td>
</tr></table>
</div>
</div>
<div class="sect3">
<h4 id="_delayed_job">Delayed::Job</h4>
<div class="paragraph"><p>The <code>dj</code> builder queues up the builds into an SQL database using
<a href="http://github.com/tobi/delayed_job">Delayed::Job</a>. To use it, install its
dependencies by uncommenting the relevant lines in the <code>Gemfile</code> and run
<code>bundle lock && bundle install</code>.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>c<span style="color: #990000">.</span>builder <span style="color: #990000">=</span> <span style="color: #990000">:</span>dj<span style="color: #990000">,</span> <span style="color: #FF0000">{</span> <span style="color: #990000">:</span>adapter <span style="color: #990000">=></span> <span style="color: #FF0000">"sqlite3"</span><span style="color: #990000">,</span> <span style="color: #990000">:</span>database <span style="color: #990000">=></span> <span style="color: #FF0000">"dj.db"</span> <span style="color: #FF0000">}</span></tt></pre></div></div>
<div class="paragraph"><p>The second argument must be a valid
<a href="http://api.rubyonrails.org/classes/ActiveRecord/Base.html#method-c-establish_connection">ActiveRecord
connection hash</a>.</p></div>
<div class="paragraph"><p>Run a worker with <code>rake jobs:work</code>. See
<a href="http://github.com/tobi/delayed_job#readme">Delayed::Job’s documentation</a>
for more details.</p></div>
</div>
<div class="sect3">
<h4 id="_resque">Resque</h4>
<div class="paragraph"><p>The <code>resque</code> builder, as the name implies, uses
<a href="https://github.com/defunkt/resque">resque</a> to store jobs.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>c<span style="color: #990000">.</span>builder <span style="color: #990000">=</span> <span style="color: #990000">:</span>resque</tt></pre></div></div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_notification">Notification</h2>
<div class="sectionbody">
<div class="paragraph"><p>After a build status is available, you want to know it <strong>immediately</strong>.
Integrity supports a number of notification mechanisms:</p></div>
<div class="ulist"><ul>
<li>
<p>
AMQP
</p>
</li>
<li>
<p>
<a href="http://campfirenow.com">Campfire</a>
</p>
</li>
<li>
<p>
<a href="https://www.flowdock.com">Flowdock</a>
</p>
</li>
<li>
<p>
Co-op
</p>
</li>
<li>
<p>
Email
</p>
</li>
<li>
<p>
HTTP
</p>
</li>
<li>
<p>
Amazon SES
</p>
</li>
<li>
<p>
Shell
</p>
</li>
<li>
<p>
TCP
</p>
</li>
</ul></div>
<div class="paragraph"><p>To enable and use a notifier with your projects:</p></div>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
Open the <code>Gemfile</code>, uncomment the relevant lines and run
<code>bundle lock && bundle install</code> to install the notifier’s dependencies.
</p>
</li>
<li>
<p>
Edit the <code>init.rb</code> file to require it. Example:
</p>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #000080">require</span></span> <span style="color: #FF0000">"integrity"</span>
<span style="font-style: italic"><span style="color: #9A1900"># You need to add this line:</span></span>
<span style="font-weight: bold"><span style="color: #000080">require</span></span> <span style="color: #FF0000">"integrity/notifier/email"</span></tt></pre></div></div>
</li>
<li>
<p>
Restart Integrity and go to a project settings screen where you can
enable and configure the notifier.
</p>
</li>
</ol></div>
<div class="sect2">
<h3 id="_http_notifier">HTTP Notifier</h3>
<div class="paragraph"><p>This notifier sends an HTTP POST request to the specified URL. The payload is
sent as HTML form fields, with <code>application/x-www-form-urlencoded</code> content
type. The fields are as follows:</p></div>
<div class="ulist"><ul>
<li>
<p>
<code>name</code>: project name
</p>
</li>
<li>
<p>
<code>status</code>: build status string (success/failed)
</p>
</li>
<li>
<p>
<code>url</code>: url to build page in Integrity
</p>
</li>
<li>
<p>
<code>repo</code>: URI specified for repository in project configuration
</p>
</li>
<li>
<p>
<code>branch</code>: branch specified in project configuration
</p>
</li>
<li>
<p>
<code>commit</code>: SHA1 of the commit that was built
</p>
</li>
<li>
<p>
<code>author</code>: Commit’s author name (without email address)
</p>
</li>
<li>
<p>
<code>message</code>: Commit message, prefixed with branch name
</p>
</li>
</ul></div>
<div class="paragraph"><p>Example request body:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>name=My+Test+Project&status=success&url=http%3A%2F%2Fwww.example.com%2Fmy-test-project%2Fbuilds%2F1&repo=%2Ftmp%2Fi%2Ftmp%2Fmy_test_project&branch=master&commit=d669c99c26419806c80326e1b09eda378e65491d&author=John+Doe&message=master%3A+This+commit+will+work</tt></pre></div></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_deployment">Deployment</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_a_href_http_modrails_com_phusion_passenger_a"><a href="http://modrails.com">Phusion Passenger</a></h3>
<div class="paragraph"><p>Please see Passenger’s documentation for
<a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html">Apache</a> and
<a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html">Nginx</a>.</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">Currently ThreadedBuilder does not work with Passenger (issue
<a href="https://github.com/integrity/integrity/issues/156">#156</a>).
Please use DelayedBuilder or ResqueBuilder.</td>
</tr></table>
</div>
</div>
<div class="sect2">
<h3 id="_a_href_http_code_macournoyer_com_thin_thin_a"><a href="http://code.macournoyer.com/thin/">Thin</a></h3>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
Uncomment the <code>thin</code> line in the Gemfile
</p>
</li>
<li>
<p>
Run <code>bundle install</code> to install Thin
</p>
</li>
</ol></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>$ <span style="color: #009900">$EDITOR</span> doc/thin<span style="color: #990000">.</span>yml
$ thin -C doc/thin<span style="color: #990000">.</span>yml start</tt></pre></div></div>
</div>
<div class="sect2">
<h3 id="_a_href_http_unicorn_bogomips_org_unicorn_a"><a href="http://unicorn.bogomips.org/">Unicorn</a></h3>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
Uncomment the <code>unicorn</code> line in the Gemfile
</p>
</li>
<li>
<p>
Run <code>bundle install</code> to install Unicorn
</p>
</li>
</ol></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 3.1.6
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>$ <span style="color: #009900">$EDITOR</span> doc/unicorn<span style="color: #990000">.</span>rb
$ unicorn -c doc/unicorn<span style="color: #990000">.</span>rb -D</tt></pre></div></div>
</div>
<div class="sect2">
<h3 id="_reverse_proxy">Reverse Proxy</h3>
<div class="paragraph"><p>You will want to run a reverse proxy such as Nginx or Apache in front of
Thin or Unicorn servers.</p></div>
<div class="sect3">
<h4 id="_a_href_http_nginx_org_nginx_a"><a href="http://nginx.org/">Nginx</a></h4>
<div class="paragraph"><p>Nginx can be configured as follows:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>http {
upstream builder-integrityapp-com {
# thin or unicorn - first instance
server 127.0.0.1:8910;
# thin only - specify all remaining instances
server 127.0.0.1:8911;
}
server {
server_name builder.integrityapp.com;
location / {
proxy_pass http://builder-integrityapp-com;
}
}</code></pre>
</div></div>
</div>
<div class="sect3">
<h4 id="_a_href_http_httpd_apache_org_apache_a"><a href="http://httpd.apache.org/">Apache</a></h4>
<div class="paragraph"><p>Apache can be configured as follows:</p></div>
<div class="listingblock">
<div class="content">
<pre><code><VirtualHost *:80>
ServerName ci.example.org
ServerAlias ci
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass / http://127.0.0.1:8910/
ProxyPassReverse / http://127.0.0.1:8910/
ProxyPassReverse / http://127.0.0.1:8911/
</VirtualHost></code></pre>
</div></div>
<div class="paragraph"><p>If you wish Apache to serve static files:</p></div>
<div class="listingblock">
<div class="content">
<pre><code><VirtualHost *:80>
ServerName ci.example.org
ServerAlias ci
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
DocumentRoot /path/to/integrity/lib/app/public
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^/(.*)$ http://localhost:8910/$1 [P]
</VirtualHost>
<Directory /path/to/integrity/lib/app/public>
Order allow,deny
Allow from all
Options None
AllowOverride None
# Apache 2.4+
AuthType None
Require all granted
</Directory></code></pre>
</div></div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_faq">FAQ</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_does_it_support_subversion_or_any_other_scm">Does it support Subversion or any other SCM?</h3>
<div class="paragraph" id="faq-scm"><p>Integrity only works with <a href="http://git-scm.org">git</a>. However, git can mirror
other SCMs, for example Subversion via git-svn, and Integrity will work with
such mirrored repositories. It is up to you to keep the mirrored repositories
up to date with your primary repositories.</p></div>
</div>
<div class="sect2">
<h3 id="_but_does_it_work_with_lt_insert_tech_here_gt">But does it work with <insert tech here>?</h3>
<div class="paragraph" id="faq-tech"><p><strong>Absolutely!</strong> As long as your build process can be run from an UNIX-y
environment and that it returns a <strong>zero</strong> status code for success and
<strong>non-zero</strong> for failure, then Integrity works for you.</p></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_support_contributing">Support / Contributing</h2>
<div class="sectionbody">
<div class="paragraph"><p>You can get in touch via IRC at <a href="irc://irc.freenode.net/integrity">#integrity on
freenode</a>. If no one happens to be around, you can ask our mailing list at
<a href="mailto:[email protected]">[email protected]</a>. (<a href="http://librelist.com/browser/integrity/">Archives</a>)</p></div>
<div class="paragraph"><p>If you find a bug, or want to give us a feature request, log it into our
<a href="http://github.com/integrity/integrity/issues">bug tracker</a>.</p></div>
<div class="paragraph"><p>To start hacking, grab the code from our git repository at
<code>git://github.com/integrity/integrity.git</code> and setup the dependencies with
<code>bundle install && bundle lock</code>. Finally, hack and <code>bundle exec rake</code> as
usual ;-)</p></div>
<div class="paragraph"><p>Once you’re done, make sure your changes are rebased on on top of the <code>master</code>
branch and open a new ticket in our bug tracker to let us know where we can
pull from.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_documentation">Documentation</h2>
<div class="sectionbody">
<div class="paragraph"><p>To build HTML documentation, run <code>rake html</code>. This is what goes on the
Integrity website (<a href="http://integrity.github.com">http://integrity.github.com</a>).</p></div>
<div class="paragraph"><p>Dependencies for HTML documentation generation:</p></div>
<div class="ulist"><ul>
<li>
<p>
<a href="http://www.methods.co.nz/asciidoc/">asciidoc</a>
</p>
</li>
<li>
<p>
<a href="http://www.gnu.org/software/src-highlite/">source-highlight</a>
</p>
</li>
</ul></div>
</div>
</div>
</div>
<div id=footer>
<div class=credits>
Integrity is © 2008, 2009, 2010
<a href="http://nicolassanguinetti.info">Nicolás Sanguinetti</a>
and <a href="http://atonie.org">Simon Rozet</a>,
© 2012, 2013
<a href="http://bsdpower.com">Oleg Pudeyev</a>
</div>
<div class=links>
<a href="http://github.com/integrity/integrity/issues">Bugs / Support</a>
|
<a href="http://github.com/integrity/integrity">Source Code</a>
</div>
</div>
</body>
</html>