octopusci 0.3.11 → 0.3.12
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +23 -17
- data/lib/octopusci/server/views/job_summary.erb +2 -5
- data/lib/octopusci/server.rb +21 -1
- data/lib/octopusci/version.rb +1 -1
- metadata +30 -30
data/README.markdown
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
|
1
|
+
OctopusCI
|
2
2
|
=========
|
3
3
|
|
4
|
-
|
4
|
+
OctopusCI is fresh new take on a continuous integration server centralized
|
5
5
|
around the concept of getting the same great CI benefits when using a
|
6
6
|
multi-branch workflow.
|
7
7
|
|
8
8
|
How's it Different?
|
9
9
|
-------------------
|
10
10
|
|
11
|
-
The impetus that brought
|
11
|
+
The impetus that brought OctopusCI into being was simply the lack of CI servers
|
12
12
|
that cleanly supported a software development workflow based on multiple
|
13
13
|
branches. Secondarily, it was the excessive amount of effort necessary to get a
|
14
14
|
basic CI server up and running.
|
@@ -16,7 +16,7 @@ basic CI server up and running.
|
|
16
16
|
Octopsuci fills this gap by providing intelligent multi-branch queueing
|
17
17
|
and multi-server job distribution. Beyond that it provides a
|
18
18
|
solid continous integration server that is trivial to get setup and running. A number
|
19
|
-
of the concepts used in
|
19
|
+
of the concepts used in OctopusCI are pulled from
|
20
20
|
[Continuous Delivery](http://continuousdelivery.com/),
|
21
21
|
[Continuous Integration](http://martinfowler.com/articles/continuousIntegration.html)
|
22
22
|
as well as Scott Chacon's post on the
|
@@ -26,14 +26,14 @@ The following is a listing of a number of some of its more significant features.
|
|
26
26
|
|
27
27
|
### Dynamic Multi-Branch Triggering
|
28
28
|
|
29
|
-
|
29
|
+
OctopusCI detects branch creation/modification and dynamically generates a build for
|
30
30
|
that branch based on the project the pushed branch belongs to. Most existing CI servers
|
31
31
|
that I have used force you to manually define jobs for each branch you would like it to
|
32
32
|
manage.
|
33
33
|
|
34
34
|
### Multi-Server Job Distribution
|
35
35
|
|
36
|
-
|
36
|
+
OctopusCI allows you to configure it to run "remote jobs" on numerous servers and it
|
37
37
|
keeps track of which servers are currently busy as well as handing new jobs to the
|
38
38
|
correct servers as they become available. This is extremely valuable if you are
|
39
39
|
interested in running automated acceptance tests that take a long time to run such
|
@@ -41,17 +41,17 @@ as Selenium/Cucumber & Capybara Tests.
|
|
41
41
|
|
42
42
|
### Intelligent Multi-Branch Queueing
|
43
43
|
|
44
|
-
|
44
|
+
OctopusCI intelligently manages its job queue by by simply updating any pending jobs with
|
45
45
|
the newly pushed branch data. This means that at any given point in time there is only
|
46
|
-
ever one pending job for each branch. When, a code push comes into
|
46
|
+
ever one pending job for each branch. When, a code push comes into OctopusCI it
|
47
47
|
first looks to see if there is already a pending job for the branch that was pushed. If
|
48
48
|
there is, it simply updates the jobs associated branch data. If there is not already a
|
49
49
|
pending job then it queues a new job for that branch.
|
50
50
|
|
51
51
|
### GitHub Integration ###
|
52
52
|
|
53
|
-
|
54
|
-
system. At some point in the future
|
53
|
+
OctopusCI was designed specifically to integrate cleanly with GitHub's push notifications
|
54
|
+
system. At some point in the future OctopusCI may support more than just GitHub but for
|
55
55
|
the time being GitHub is our primary focus.
|
56
56
|
|
57
57
|
Install Guide
|
@@ -59,9 +59,9 @@ Install Guide
|
|
59
59
|
|
60
60
|
### Install Dependencies ###
|
61
61
|
|
62
|
-
|
62
|
+
OctopusCI has one major dependency at the moment, [Redis](http://redis.io/).
|
63
63
|
[Redis](http://redis.io/) needs to be installed and configured to startup appropriately
|
64
|
-
on the box you plan to run
|
64
|
+
on the box you plan to run OctopusCI on.
|
65
65
|
|
66
66
|
On Debian/Ubuntu machines this is to my knowledge as easy as `apt-get install redis-server`.
|
67
67
|
|
@@ -88,7 +88,7 @@ TODO: Fill this out with details on the config, required fields, optional fields
|
|
88
88
|
### Jobs ###
|
89
89
|
|
90
90
|
Add any jobs you would like to the `/etc/octopusci/jobs` directory as .rb files
|
91
|
-
and
|
91
|
+
and OctopusCI will load them appropriately when started.
|
92
92
|
|
93
93
|
### Web Interface ###
|
94
94
|
|
@@ -114,13 +114,13 @@ Apache virtual host example
|
|
114
114
|
</Directory>
|
115
115
|
</VirtualHost>
|
116
116
|
|
117
|
-
The above will give us the web
|
117
|
+
The above will give us the web OctopusCI web interface.
|
118
118
|
|
119
119
|
If you are developing you can simply start this up by running
|
120
120
|
`rackup -p whatever_port` while inside the octopusci directory where the
|
121
121
|
`config.ru` file exists.
|
122
122
|
|
123
|
-
I recommend you setup the second half of
|
123
|
+
I recommend you setup the second half of OctopusCI (`octopusci-tentacles`) with
|
124
124
|
God or some other monitoring system. However, for development you can simply
|
125
125
|
run `octopusci-tentacles` directoly as follows:
|
126
126
|
|
@@ -129,9 +129,15 @@ run `octopusci-tentacles` directoly as follows:
|
|
129
129
|
Screenshots
|
130
130
|
-----------
|
131
131
|
|
132
|
-
![
|
132
|
+
![OctopusCI - Dashboard](https://img.skitch.com/20111005-tfxgw59mec5msnfu3pd6is3btf.jpg)
|
133
|
+
|
134
|
+
IRC
|
135
|
+
---
|
136
|
+
|
137
|
+
We currently have a persistent IRC channel named `#octopusci` setup on `irc.freenode.net`.
|
138
|
+
I try to be in this room all the time to help people out, answer questions, and help contributors out.
|
133
139
|
|
134
140
|
Development
|
135
141
|
-----------
|
136
142
|
|
137
|
-
If you are interested in developing
|
143
|
+
If you are interested in developing OctopusCI then please checkout the [Developer Setup](http://github.com/cyphactor/octopusci/wiki/Developer-Setup) wiki page.
|
@@ -1,12 +1,9 @@
|
|
1
1
|
<div class="job_header">
|
2
|
-
<div class="job_title"
|
2
|
+
<div class="job_title">
|
3
3
|
<span class="status <%= j['status'] %>"></span>
|
4
4
|
<div style="float: left;">
|
5
5
|
<a href="<%= j['payload']['repository']['url'] %>"><%= j['repo_name'] %></a> / <a href="/<%= j['repo_name'] %>/<%= j['branch_name'] %>/jobs"><%= j['branch_name'] %></a>
|
6
6
|
</div>
|
7
|
-
<div style="float: right;">
|
8
|
-
<a href="">retry</a>
|
9
|
-
</div>
|
10
7
|
<div style="clear: both;"></div>
|
11
8
|
</div>
|
12
9
|
<div class="created_on">
|
@@ -18,7 +15,7 @@
|
|
18
15
|
<table>
|
19
16
|
<tr>
|
20
17
|
<td style="text-align: right;">Job:</td>
|
21
|
-
<td style="width: 200px;"><a href="/jobs/<%= j['id'] %>"><%= j['id'] %></a
|
18
|
+
<td style="width: 200px;"><a href="/jobs/<%= j['id'] %>"><%= j['id'] %></a> ( <a href="/rebuild/<%= j['id'] %>">re-enqueue</a> )</td>
|
22
19
|
<td style="text-align: right;">Before Commit:</td>
|
23
20
|
<td>
|
24
21
|
<% if !j['payload']['created'] %>
|
data/lib/octopusci/server.rb
CHANGED
@@ -70,6 +70,26 @@ module Octopusci
|
|
70
70
|
@job = Octopusci::JobStore.get(params[:job_id])
|
71
71
|
erb :job_summary, :layout => false, :locals => { :j => @job }
|
72
72
|
end
|
73
|
+
|
74
|
+
get '/rebuild/:job_id' do
|
75
|
+
protected!
|
76
|
+
|
77
|
+
job = Octopusci::JobStore.get(params[:job_id])
|
78
|
+
|
79
|
+
# Make sure that the request is for a project Octopusci knows about
|
80
|
+
proj_info = Octopusci::Helpers.get_project_info(job['repo_name'], job['repo_owner_name'])
|
81
|
+
if proj_info.nil?
|
82
|
+
return 404
|
83
|
+
end
|
84
|
+
|
85
|
+
gh_pl_key = Octopusci::Queue.github_payload_key(job['repo_name'], job['branch_name'])
|
86
|
+
resque_encoded_payload = Octopusci::Queue.redis.get(gh_pl_key)
|
87
|
+
gh_pl = Resque.decode(resque_encoded_payload)
|
88
|
+
|
89
|
+
Octopusci::Queue.enqueue(proj_info['job_klass'], job['repo_name'], job['branch_name'], gh_pl, proj_info)
|
90
|
+
|
91
|
+
redirect '/'
|
92
|
+
end
|
73
93
|
|
74
94
|
post '/github-build' do
|
75
95
|
if params['payload'].nil?
|
@@ -95,4 +115,4 @@ module Octopusci
|
|
95
115
|
end
|
96
116
|
|
97
117
|
end
|
98
|
-
end
|
118
|
+
end
|
data/lib/octopusci/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopusci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-07-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sinatra
|
17
|
-
requirement: &
|
17
|
+
requirement: &70107108014280 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70107108014280
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: json
|
28
|
-
requirement: &
|
28
|
+
requirement: &70107108013340 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70107108013340
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: resque
|
39
|
-
requirement: &
|
39
|
+
requirement: &70107108040540 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70107108040540
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: actionmailer
|
50
|
-
requirement: &
|
50
|
+
requirement: &70107108039840 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70107108039840
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: multi_json
|
61
|
-
requirement: &
|
61
|
+
requirement: &70107108039080 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '0'
|
67
67
|
type: :runtime
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70107108039080
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: time-ago-in-words
|
72
|
-
requirement: &
|
72
|
+
requirement: &70107108038360 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: '0'
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70107108038360
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: ansi2html
|
83
|
-
requirement: &
|
83
|
+
requirement: &70107108036920 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: '0'
|
89
89
|
type: :runtime
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *70107108036920
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: trollop
|
94
|
-
requirement: &
|
94
|
+
requirement: &70107108036240 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ! '>='
|
@@ -99,10 +99,10 @@ dependencies:
|
|
99
99
|
version: '0'
|
100
100
|
type: :runtime
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *70107108036240
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: rake
|
105
|
-
requirement: &
|
105
|
+
requirement: &70107108035260 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ! '>='
|
@@ -110,10 +110,10 @@ dependencies:
|
|
110
110
|
version: '0'
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *70107108035260
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: rspec
|
116
|
-
requirement: &
|
116
|
+
requirement: &70107108034420 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ! '>='
|
@@ -121,10 +121,10 @@ dependencies:
|
|
121
121
|
version: '0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *70107108034420
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rack-test
|
127
|
-
requirement: &
|
127
|
+
requirement: &70107108033800 !ruby/object:Gem::Requirement
|
128
128
|
none: false
|
129
129
|
requirements:
|
130
130
|
- - ! '>='
|
@@ -132,10 +132,10 @@ dependencies:
|
|
132
132
|
version: '0'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
|
-
version_requirements: *
|
135
|
+
version_requirements: *70107108033800
|
136
136
|
- !ruby/object:Gem::Dependency
|
137
137
|
name: guard
|
138
|
-
requirement: &
|
138
|
+
requirement: &70107108032800 !ruby/object:Gem::Requirement
|
139
139
|
none: false
|
140
140
|
requirements:
|
141
141
|
- - ! '>='
|
@@ -143,10 +143,10 @@ dependencies:
|
|
143
143
|
version: '0'
|
144
144
|
type: :development
|
145
145
|
prerelease: false
|
146
|
-
version_requirements: *
|
146
|
+
version_requirements: *70107108032800
|
147
147
|
- !ruby/object:Gem::Dependency
|
148
148
|
name: guard-rspec
|
149
|
-
requirement: &
|
149
|
+
requirement: &70107108057400 !ruby/object:Gem::Requirement
|
150
150
|
none: false
|
151
151
|
requirements:
|
152
152
|
- - ! '>='
|
@@ -154,10 +154,10 @@ dependencies:
|
|
154
154
|
version: '0'
|
155
155
|
type: :development
|
156
156
|
prerelease: false
|
157
|
-
version_requirements: *
|
157
|
+
version_requirements: *70107108057400
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: ruby_gntp
|
160
|
-
requirement: &
|
160
|
+
requirement: &70107108056540 !ruby/object:Gem::Requirement
|
161
161
|
none: false
|
162
162
|
requirements:
|
163
163
|
- - ! '>='
|
@@ -165,7 +165,7 @@ dependencies:
|
|
165
165
|
version: '0'
|
166
166
|
type: :development
|
167
167
|
prerelease: false
|
168
|
-
version_requirements: *
|
168
|
+
version_requirements: *70107108056540
|
169
169
|
description: A multi-branch Continuous Integration server that integrates with GitHub
|
170
170
|
email:
|
171
171
|
- cyphactor@gmail.com
|