jenkins 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +46 -0
- data/README.md +6 -3
- data/Rakefile +47 -22
- data/jenkins.gemspec +10 -9
- data/lib/jenkins/api.rb +39 -4
- data/lib/jenkins/cli.rb +12 -1
- data/lib/jenkins/version.rb +1 -1
- data/spec/api_spec.rb +58 -0
- metadata +133 -173
- data/Gemfile.lock +0 -56
- data/features/launch_server.feature +0 -16
data/.gitignore
CHANGED
data/.travis.yml
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# This file lifted wholesale from https://github.com/travis-ci/travis-ci/wiki/.travis.yml-options
|
2
|
+
|
3
|
+
# Passes arguments to bundle install (http://gembundler.com/man/bundle-install.1.html)
|
4
|
+
#bundler_args: --binstubs
|
5
|
+
|
6
|
+
# Specify which ruby versions you wish to run your tests on, each version will be used
|
7
|
+
rvm:
|
8
|
+
- 1.8.7
|
9
|
+
- 1.9.2
|
10
|
+
- 1.9.3
|
11
|
+
# - rbx
|
12
|
+
# - rbx-2.0
|
13
|
+
# - ree
|
14
|
+
# - jruby
|
15
|
+
# - ruby-head
|
16
|
+
# - 1.8.6
|
17
|
+
|
18
|
+
# Define how to run your tests (defaults to `bundle exec rake` or `rake` depending on whether you have a `Gemfile`)
|
19
|
+
script: "bundle exec rake"
|
20
|
+
|
21
|
+
# Define tasks to be completed before and after tests run . Will allow folding of content on frontend
|
22
|
+
# before_script:
|
23
|
+
# - command_1
|
24
|
+
# - command_2
|
25
|
+
|
26
|
+
# after_script:
|
27
|
+
# - command_1
|
28
|
+
# - command_2
|
29
|
+
|
30
|
+
# Specify an ENV variable to run before: 'bundle install' and 'rake' (or your defined 'script')
|
31
|
+
#env: "RAILS_ENV='test' " #
|
32
|
+
|
33
|
+
# Specify the recipients for email notification
|
34
|
+
notifications:
|
35
|
+
recipients:
|
36
|
+
- cowboyd@thefrontside.net
|
37
|
+
# - drnicwilliams@gmail.com
|
38
|
+
# disabled: true # Disable email notifications
|
39
|
+
|
40
|
+
# Specify branches to build
|
41
|
+
# You can either specify only or except. If you specify both, except will be ignored.
|
42
|
+
branches:
|
43
|
+
only:
|
44
|
+
- master
|
45
|
+
# except:
|
46
|
+
# - legacy
|
data/README.md
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
Jenkins
|
2
2
|
======
|
3
3
|
|
4
|
-
[Jenkins CI](http://jenkins-ci.org/) is a sweet continuous integration
|
4
|
+
[Jenkins CI](http://jenkins-ci.org/) is a sweet continuous integration
|
5
|
+
platform. Jenkins.rb makes it easy to get started, add/remove Ruby
|
6
|
+
jobs and slave nodes; either from a CLI or an API.
|
7
|
+
|
5
8
|
|
6
9
|
* Email: [http://groups.google.com/group/jenkinsrb](http://groups.google.com/group/jenkinsrb)
|
7
10
|
* IRC: [irc://irc.freenode.net/jenkins.rb](irc://irc.freenode.net/jenkins.rb)
|
8
|
-
* CI: [http://
|
11
|
+
* CI: [http://travis-ci.org/cowboyd/jenkins.rb](http://travis-ci.org/cowboyd/jenkins.rb)
|
9
12
|
|
10
13
|
Install
|
11
14
|
=======
|
@@ -156,4 +159,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
156
159
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
157
160
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
158
161
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
159
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
162
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -20,41 +20,67 @@ task :cucumber => 'cucumber:ok'
|
|
20
20
|
|
21
21
|
desc "Start test server; Run cucumber:ok; Kill Test Server;"
|
22
22
|
task :default => [:spec, "jenkins:server:killtest", "jenkins:server:test"] do
|
23
|
+
begin
|
24
|
+
result = Rake::Task["cucumber:ok"].invoke
|
25
|
+
ensure
|
26
|
+
Rake::Task["jenkins:server:killtest"].execute
|
27
|
+
end
|
28
|
+
raise unless result
|
29
|
+
end
|
30
|
+
|
31
|
+
# This verifies that Jenkins is started
|
32
|
+
# and that it is ready to accept requests.
|
33
|
+
def wait_for_server_start
|
23
34
|
require 'socket'
|
24
35
|
require 'net/http'
|
25
|
-
print "waiting for at most 30 seconds for the server to start"
|
26
36
|
tries = 1
|
37
|
+
max_tries = 30
|
38
|
+
successes = 0
|
39
|
+
max_successes = 2
|
40
|
+
wait = 5
|
41
|
+
print "Waiting for the server to start (max tries: #{max_tries} with a #{wait} second pause between tries): "
|
27
42
|
begin
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
43
|
+
while tries <= max_tries
|
44
|
+
tries += 1
|
45
|
+
begin
|
46
|
+
Net::HTTP.start("localhost", "3010") do |http|
|
47
|
+
response = http.get('/')
|
48
|
+
if response.code == "200"
|
49
|
+
print "O"
|
50
|
+
successes += 1
|
51
|
+
return true if successes >= max_successes
|
52
|
+
else
|
53
|
+
print "o"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
rescue SystemCallError => e
|
57
|
+
successes = 0
|
58
|
+
if tries == max_tries
|
59
|
+
print "!"
|
60
|
+
raise
|
61
|
+
end
|
62
|
+
print "."
|
63
|
+
end
|
64
|
+
$stdout.flush
|
65
|
+
sleep(wait)
|
38
66
|
end
|
39
|
-
raise
|
40
67
|
ensure
|
41
|
-
|
42
|
-
|
43
|
-
task.invoke
|
44
|
-
end
|
68
|
+
puts # Ensure a newline gets added
|
69
|
+
$stdout.flush
|
45
70
|
end
|
46
|
-
|
71
|
+
return false
|
47
72
|
end
|
48
73
|
|
49
74
|
namespace :jenkins do
|
50
75
|
namespace :server do
|
51
76
|
require 'fileutils'
|
52
77
|
|
78
|
+
port = 3010
|
79
|
+
control = 3011
|
53
80
|
directory plugin_dir = File.expand_path("../var/jenkins/plugins", __FILE__)
|
81
|
+
|
54
82
|
desc "Run a server for tests"
|
55
83
|
task :test => plugin_dir do
|
56
|
-
port = 3010
|
57
|
-
control = 3011
|
58
84
|
FileUtils.chdir(File.dirname(__FILE__)) do
|
59
85
|
Dir["fixtures/jenkins/*.hpi"].each do |plugin|
|
60
86
|
FileUtils.cp plugin, plugin_dir
|
@@ -64,13 +90,14 @@ namespace :jenkins do
|
|
64
90
|
puts " output will be logged to #{logfile}"
|
65
91
|
`bundle exec bin/jenkins server --home #{File.dirname(plugin_dir)} --port #{port} --control #{control} --daemon --logfile #{logfile}`
|
66
92
|
end
|
93
|
+
wait_for_server_start
|
67
94
|
end
|
68
95
|
|
69
96
|
desc "Kill jenkins test server if it is running."
|
70
97
|
task :killtest do
|
71
98
|
FileUtils.chdir(File.dirname(__FILE__)) do
|
72
99
|
puts "Killing any running server processes..."
|
73
|
-
`ruby bin/jenkins server --control
|
100
|
+
`ruby bin/jenkins server --control #{control} --kill 2>/dev/null`
|
74
101
|
end
|
75
102
|
end
|
76
103
|
|
@@ -78,5 +105,3 @@ namespace :jenkins do
|
|
78
105
|
end
|
79
106
|
|
80
107
|
Dir['tasks/**/*.rake'].each {|f| load f}
|
81
|
-
|
82
|
-
|
data/jenkins.gemspec
CHANGED
@@ -15,19 +15,20 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.rubyforge_project = "jenkins"
|
16
16
|
|
17
17
|
s.files = `git ls-files`.split("\n")
|
18
|
-
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_dependency("term-ansicolor",
|
23
|
-
s.add_dependency("httparty",
|
24
|
-
s.add_dependency("builder",
|
25
|
-
s.add_dependency("thor",
|
22
|
+
s.add_dependency("term-ansicolor", ">= 1.0.4")
|
23
|
+
s.add_dependency("httparty", "~> 0.6.1")
|
24
|
+
s.add_dependency("builder", "~> 2.1.2")
|
25
|
+
s.add_dependency("thor", "~> 0.14.2")
|
26
26
|
s.add_dependency("hpricot")
|
27
27
|
s.add_dependency("json_pure", ">= 1.5.1")
|
28
|
+
|
28
29
|
s.add_development_dependency("jenkins-war", ">= 1.396")
|
29
|
-
s.add_development_dependency
|
30
|
-
s.add_development_dependency
|
31
|
-
s.add_development_dependency
|
32
|
-
s.add_development_dependency
|
30
|
+
s.add_development_dependency "rake"
|
31
|
+
s.add_development_dependency "cucumber", "~> 1.0"
|
32
|
+
s.add_development_dependency "rspec", "~> 2.0"
|
33
|
+
s.add_development_dependency "awesome_print"
|
33
34
|
end
|
data/lib/jenkins/api.rb
CHANGED
@@ -2,10 +2,13 @@ require 'httparty'
|
|
2
2
|
require 'cgi'
|
3
3
|
require 'uri'
|
4
4
|
require 'json'
|
5
|
+
require 'yaml'
|
5
6
|
|
6
7
|
require 'jenkins/core_ext/hash'
|
7
8
|
require 'jenkins/config'
|
8
9
|
|
10
|
+
YAML::ENGINE.yamler = "syck" if RUBY_VERSION >= '1.9'
|
11
|
+
|
9
12
|
module Jenkins
|
10
13
|
module Api
|
11
14
|
include HTTParty
|
@@ -16,17 +19,39 @@ module Jenkins
|
|
16
19
|
|
17
20
|
JobAlreadyExistsError = Class.new(Exception)
|
18
21
|
|
19
|
-
def self.setup_base_url(options)
|
22
|
+
def self.setup_base_url(options = {})
|
23
|
+
# Handle single strings
|
24
|
+
options = { :host => options } if options.is_a? String
|
20
25
|
options = options.with_clean_keys
|
21
26
|
# Thor's HashWithIndifferentAccess is based on string keys which URI::HTTP.build ignores
|
22
27
|
options = options.inject({}) { |mem, (key, val)| mem[key.to_sym] = val; mem }
|
28
|
+
|
29
|
+
# Handle URL style hosts by parsing the URL
|
30
|
+
if options.keys.length == 1 && options.key?(:host)
|
31
|
+
parsed_uri = URI::parse(options[:host])
|
32
|
+
options = {
|
33
|
+
:host => parsed_uri.host,
|
34
|
+
:port => parsed_uri.port,
|
35
|
+
:path => parsed_uri.path,
|
36
|
+
:ssl => parsed_uri.scheme == 'https'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
23
40
|
options = setup_authentication(options)
|
24
41
|
options[:host] ||= ENV['JENKINS_HOST']
|
25
42
|
options[:port] ||= ENV['JENKINS_PORT']
|
26
43
|
options[:port] &&= options[:port].to_i
|
27
|
-
|
28
|
-
|
29
|
-
|
44
|
+
|
45
|
+
if options[:host]
|
46
|
+
uri_class = options.delete(:ssl) ? URI::HTTPS : URI::HTTP
|
47
|
+
uri = uri_class.build(options)
|
48
|
+
else
|
49
|
+
if Jenkins::Config.config["base_uri"]
|
50
|
+
uri = Jenkins::Config.config["base_uri"]
|
51
|
+
else
|
52
|
+
return false # Nothing to work with.
|
53
|
+
end
|
54
|
+
end
|
30
55
|
base_uri uri.to_s
|
31
56
|
uri
|
32
57
|
end
|
@@ -112,6 +137,16 @@ module Jenkins
|
|
112
137
|
end
|
113
138
|
end
|
114
139
|
|
140
|
+
# Return the console log information about a build.
|
141
|
+
def self.console(job_name, axe, build_number)
|
142
|
+
path = "/job/#{job_name}/#{build_number}/"
|
143
|
+
path << "#{axe}/" if axe
|
144
|
+
path << "consoleText"
|
145
|
+
log = get_plain path
|
146
|
+
cache_configuration!
|
147
|
+
log.body
|
148
|
+
end
|
149
|
+
|
115
150
|
def self.nodes
|
116
151
|
json = get "/computer/api/json"
|
117
152
|
cache_configuration!
|
data/lib/jenkins/cli.rb
CHANGED
@@ -147,7 +147,7 @@ module Jenkins
|
|
147
147
|
method_option :json, :desc => 'Dump as JSON format'
|
148
148
|
method_option :yaml, :desc => 'Dump as YAML format'
|
149
149
|
common_options
|
150
|
-
def build_details(job_name, build_number)
|
150
|
+
def build_details(job_name, build_number="lastBuild")
|
151
151
|
select_jenkins_server(options)
|
152
152
|
if build_details = Jenkins::Api.build_details(job_name, build_number)
|
153
153
|
if options[:hash]
|
@@ -166,6 +166,13 @@ module Jenkins
|
|
166
166
|
end
|
167
167
|
end
|
168
168
|
|
169
|
+
desc "console JOB_NAME BUILD_NUMBER [AXE]", "Display the console"
|
170
|
+
common_options
|
171
|
+
def console(job_name, axe=nil, build_number="lastBuild")
|
172
|
+
select_jenkins_server(options)
|
173
|
+
puts Jenkins::Api.console(job_name, build_number, axe)
|
174
|
+
end
|
175
|
+
|
169
176
|
desc "list [options]", "list jobs on a jenkins server"
|
170
177
|
common_options
|
171
178
|
def list
|
@@ -267,6 +274,10 @@ USEAGE
|
|
267
274
|
|
268
275
|
private
|
269
276
|
|
277
|
+
def method_missing(name, *args)
|
278
|
+
console(name, *args)
|
279
|
+
end
|
280
|
+
|
270
281
|
def select_jenkins_server(options)
|
271
282
|
unless @uri = Jenkins::Api.setup_base_url(options)
|
272
283
|
error "Either use --host or add remote servers."
|
data/lib/jenkins/version.rb
CHANGED
data/spec/api_spec.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/spec_helper"
|
2
|
+
|
3
|
+
describe Jenkins::Api do
|
4
|
+
context "#setup_base_url" do
|
5
|
+
|
6
|
+
it "should accept a hash with a host and port as an argument" do
|
7
|
+
uri = Jenkins::Api.setup_base_url :host => 'hash.example.com', :port => '123'
|
8
|
+
uri.host.should == 'hash.example.com'
|
9
|
+
uri.port.should == 123
|
10
|
+
uri.path.should == ''
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should accept 'http://localhost:3010/somepath' as a string argument" do
|
14
|
+
uri = Jenkins::Api.setup_base_url 'http://string.example.com:1/somepath'
|
15
|
+
uri.host.should == 'string.example.com'
|
16
|
+
uri.port.should == 1
|
17
|
+
uri.path.should == '/somepath'
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should accept 'http://localhost:3010/' as a :host argument" do
|
21
|
+
uri = Jenkins::Api.setup_base_url :host => 'http://string.example.com:2'
|
22
|
+
uri.host.should == 'string.example.com'
|
23
|
+
uri.port.should == 2
|
24
|
+
uri.path.should == ''
|
25
|
+
end
|
26
|
+
|
27
|
+
context "with environment variables" do
|
28
|
+
after :each do
|
29
|
+
ENV.delete 'JENKINS_HOST'
|
30
|
+
ENV.delete 'JENKINS_PORT'
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should accept the environment variables JENKINS_HOST and JENKINS_PORT" do
|
34
|
+
ENV['JENKINS_HOST'] = 'environment.example.com'
|
35
|
+
ENV['JENKINS_PORT'] = '432'
|
36
|
+
uri = Jenkins::Api.setup_base_url
|
37
|
+
uri.host.should == 'environment.example.com'
|
38
|
+
uri.port.should == 432
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should not let environment variables override a hash" do
|
42
|
+
ENV['JENKINS_HOST'] = 'wrong.example.com'
|
43
|
+
ENV['JENKINS_PORT'] = '123'
|
44
|
+
uri = Jenkins::Api.setup_base_url :host => 'right.example.com', :port => '111'
|
45
|
+
uri.host.should == 'right.example.com'
|
46
|
+
uri.port.should == 111
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should not let environment variables override a string URL" do
|
50
|
+
ENV['JENKINS_HOST'] = 'wrong.example.com'
|
51
|
+
ENV['JENKINS_PORT'] = '123'
|
52
|
+
uri = Jenkins::Api.setup_base_url 'http://right.example.com:111/'
|
53
|
+
uri.host.should == 'right.example.com'
|
54
|
+
uri.port.should == 111
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
metadata
CHANGED
@@ -1,210 +1,152 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: jenkins
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.6
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 6
|
9
|
-
- 5
|
10
|
-
version: 0.6.5
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Charles Lowell
|
14
9
|
- Nic Williams
|
15
10
|
autorequire:
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
dependencies:
|
22
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2011-12-05 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
23
16
|
name: term-ansicolor
|
24
|
-
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
17
|
+
requirement: &2153858500 !ruby/object:Gem::Requirement
|
26
18
|
none: false
|
27
|
-
requirements:
|
28
|
-
- -
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
hash: 31
|
31
|
-
segments:
|
32
|
-
- 1
|
33
|
-
- 0
|
34
|
-
- 4
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
35
22
|
version: 1.0.4
|
36
23
|
type: :runtime
|
37
|
-
version_requirements: *id001
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: httparty
|
40
24
|
prerelease: false
|
41
|
-
|
25
|
+
version_requirements: *2153858500
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: httparty
|
28
|
+
requirement: &2153906860 !ruby/object:Gem::Requirement
|
42
29
|
none: false
|
43
|
-
requirements:
|
30
|
+
requirements:
|
44
31
|
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
hash: 5
|
47
|
-
segments:
|
48
|
-
- 0
|
49
|
-
- 6
|
50
|
-
- 1
|
32
|
+
- !ruby/object:Gem::Version
|
51
33
|
version: 0.6.1
|
52
34
|
type: :runtime
|
53
|
-
version_requirements: *id002
|
54
|
-
- !ruby/object:Gem::Dependency
|
55
|
-
name: builder
|
56
35
|
prerelease: false
|
57
|
-
|
36
|
+
version_requirements: *2153906860
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: builder
|
39
|
+
requirement: &2160258200 !ruby/object:Gem::Requirement
|
58
40
|
none: false
|
59
|
-
requirements:
|
41
|
+
requirements:
|
60
42
|
- - ~>
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
hash: 15
|
63
|
-
segments:
|
64
|
-
- 2
|
65
|
-
- 1
|
66
|
-
- 2
|
43
|
+
- !ruby/object:Gem::Version
|
67
44
|
version: 2.1.2
|
68
45
|
type: :runtime
|
69
|
-
version_requirements: *id003
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: thor
|
72
46
|
prerelease: false
|
73
|
-
|
47
|
+
version_requirements: *2160258200
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: thor
|
50
|
+
requirement: &2153763220 !ruby/object:Gem::Requirement
|
74
51
|
none: false
|
75
|
-
requirements:
|
52
|
+
requirements:
|
76
53
|
- - ~>
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
hash: 35
|
79
|
-
segments:
|
80
|
-
- 0
|
81
|
-
- 14
|
82
|
-
- 2
|
54
|
+
- !ruby/object:Gem::Version
|
83
55
|
version: 0.14.2
|
84
56
|
type: :runtime
|
85
|
-
version_requirements: *id004
|
86
|
-
- !ruby/object:Gem::Dependency
|
87
|
-
name: hpricot
|
88
57
|
prerelease: false
|
89
|
-
|
58
|
+
version_requirements: *2153763220
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: hpricot
|
61
|
+
requirement: &2153421620 !ruby/object:Gem::Requirement
|
90
62
|
none: false
|
91
|
-
requirements:
|
92
|
-
- -
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
|
95
|
-
segments:
|
96
|
-
- 0
|
97
|
-
version: "0"
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
98
67
|
type: :runtime
|
99
|
-
version_requirements: *id005
|
100
|
-
- !ruby/object:Gem::Dependency
|
101
|
-
name: json_pure
|
102
68
|
prerelease: false
|
103
|
-
|
69
|
+
version_requirements: *2153421620
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: json_pure
|
72
|
+
requirement: &2153226880 !ruby/object:Gem::Requirement
|
104
73
|
none: false
|
105
|
-
requirements:
|
106
|
-
- -
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
hash: 1
|
109
|
-
segments:
|
110
|
-
- 1
|
111
|
-
- 5
|
112
|
-
- 1
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
113
77
|
version: 1.5.1
|
114
78
|
type: :runtime
|
115
|
-
version_requirements: *id006
|
116
|
-
- !ruby/object:Gem::Dependency
|
117
|
-
name: jenkins-war
|
118
79
|
prerelease: false
|
119
|
-
|
80
|
+
version_requirements: *2153226880
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: jenkins-war
|
83
|
+
requirement: &2153031100 !ruby/object:Gem::Requirement
|
120
84
|
none: false
|
121
|
-
requirements:
|
122
|
-
- -
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
|
125
|
-
segments:
|
126
|
-
- 1
|
127
|
-
- 396
|
128
|
-
version: "1.396"
|
85
|
+
requirements:
|
86
|
+
- - ! '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.396'
|
129
89
|
type: :development
|
130
|
-
version_requirements: *id007
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: rake
|
133
90
|
prerelease: false
|
134
|
-
|
91
|
+
version_requirements: *2153031100
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: rake
|
94
|
+
requirement: &2152673180 !ruby/object:Gem::Requirement
|
135
95
|
none: false
|
136
|
-
requirements:
|
137
|
-
- -
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
|
140
|
-
segments:
|
141
|
-
- 0
|
142
|
-
- 8
|
143
|
-
- 7
|
144
|
-
version: 0.8.7
|
96
|
+
requirements:
|
97
|
+
- - ! '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
145
100
|
type: :development
|
146
|
-
version_requirements: *id008
|
147
|
-
- !ruby/object:Gem::Dependency
|
148
|
-
name: cucumber
|
149
101
|
prerelease: false
|
150
|
-
|
102
|
+
version_requirements: *2152673180
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: cucumber
|
105
|
+
requirement: &2152176120 !ruby/object:Gem::Requirement
|
151
106
|
none: false
|
152
|
-
requirements:
|
107
|
+
requirements:
|
153
108
|
- - ~>
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
|
156
|
-
segments:
|
157
|
-
- 0
|
158
|
-
- 10
|
159
|
-
- 0
|
160
|
-
version: 0.10.0
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.0'
|
161
111
|
type: :development
|
162
|
-
version_requirements: *id009
|
163
|
-
- !ruby/object:Gem::Dependency
|
164
|
-
name: rspec
|
165
112
|
prerelease: false
|
166
|
-
|
113
|
+
version_requirements: *2152176120
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: rspec
|
116
|
+
requirement: &2151800240 !ruby/object:Gem::Requirement
|
167
117
|
none: false
|
168
|
-
requirements:
|
118
|
+
requirements:
|
169
119
|
- - ~>
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
|
172
|
-
segments:
|
173
|
-
- 2
|
174
|
-
- 0
|
175
|
-
- 0
|
176
|
-
version: 2.0.0
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '2.0'
|
177
122
|
type: :development
|
178
|
-
version_requirements: *id010
|
179
|
-
- !ruby/object:Gem::Dependency
|
180
|
-
name: awesome_print
|
181
123
|
prerelease: false
|
182
|
-
|
124
|
+
version_requirements: *2151800240
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: awesome_print
|
127
|
+
requirement: &2151798120 !ruby/object:Gem::Requirement
|
183
128
|
none: false
|
184
|
-
requirements:
|
185
|
-
- -
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
|
188
|
-
segments:
|
189
|
-
- 0
|
190
|
-
version: "0"
|
129
|
+
requirements:
|
130
|
+
- - ! '>='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
191
133
|
type: :development
|
192
|
-
|
193
|
-
|
194
|
-
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: *2151798120
|
136
|
+
description: A suite of utilities for bringing continous integration to your projects
|
137
|
+
(not the other way around) with jenkins CI
|
138
|
+
email:
|
195
139
|
- cowboyd@thefrontside.net
|
196
140
|
- drnicwilliams@gmail.com
|
197
|
-
executables:
|
141
|
+
executables:
|
198
142
|
- jenkins
|
199
143
|
extensions: []
|
200
|
-
|
201
144
|
extra_rdoc_files: []
|
202
|
-
|
203
|
-
files:
|
145
|
+
files:
|
204
146
|
- .gitignore
|
147
|
+
- .travis.yml
|
205
148
|
- Changelog.md
|
206
149
|
- Gemfile
|
207
|
-
- Gemfile.lock
|
208
150
|
- README.md
|
209
151
|
- Rakefile
|
210
152
|
- bin/jenkins
|
@@ -213,7 +155,6 @@ files:
|
|
213
155
|
- features/configure.feature
|
214
156
|
- features/default_host.feature
|
215
157
|
- features/development.feature
|
216
|
-
- features/launch_server.feature
|
217
158
|
- features/listing_jobs.feature
|
218
159
|
- features/manage_jobs.feature
|
219
160
|
- features/manage_slave_nodes.feature
|
@@ -294,6 +235,7 @@ files:
|
|
294
235
|
- lib/jenkins/project_scm.rb
|
295
236
|
- lib/jenkins/remote.rb
|
296
237
|
- lib/jenkins/version.rb
|
238
|
+
- spec/api_spec.rb
|
297
239
|
- spec/fixtures/ec2_global.config.xml
|
298
240
|
- spec/fixtures/erlang.single.config.xml
|
299
241
|
- spec/fixtures/rails.multi.config.xml
|
@@ -306,39 +248,57 @@ files:
|
|
306
248
|
- spec/hash_key_cleaner_spec.rb
|
307
249
|
- spec/job_config_builder_spec.rb
|
308
250
|
- spec/spec_helper.rb
|
309
|
-
has_rdoc: true
|
310
251
|
homepage: http://github.com/cowboyd/jenkins.rb
|
311
252
|
licenses: []
|
312
|
-
|
313
253
|
post_install_message:
|
314
254
|
rdoc_options: []
|
315
|
-
|
316
|
-
require_paths:
|
255
|
+
require_paths:
|
317
256
|
- lib
|
318
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
257
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
319
258
|
none: false
|
320
|
-
requirements:
|
321
|
-
- -
|
322
|
-
- !ruby/object:Gem::Version
|
323
|
-
|
324
|
-
|
325
|
-
- 0
|
326
|
-
version: "0"
|
327
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
259
|
+
requirements:
|
260
|
+
- - ! '>='
|
261
|
+
- !ruby/object:Gem::Version
|
262
|
+
version: '0'
|
263
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
328
264
|
none: false
|
329
|
-
requirements:
|
330
|
-
- -
|
331
|
-
- !ruby/object:Gem::Version
|
332
|
-
|
333
|
-
segments:
|
334
|
-
- 0
|
335
|
-
version: "0"
|
265
|
+
requirements:
|
266
|
+
- - ! '>='
|
267
|
+
- !ruby/object:Gem::Version
|
268
|
+
version: '0'
|
336
269
|
requirements: []
|
337
|
-
|
338
270
|
rubyforge_project: jenkins
|
339
|
-
rubygems_version: 1.
|
271
|
+
rubygems_version: 1.8.10
|
340
272
|
signing_key:
|
341
273
|
specification_version: 3
|
342
274
|
summary: Painless Continuous Integration with Jenkins Server
|
343
|
-
test_files:
|
344
|
-
|
275
|
+
test_files:
|
276
|
+
- features/build_details.feature
|
277
|
+
- features/configure.feature
|
278
|
+
- features/default_host.feature
|
279
|
+
- features/development.feature
|
280
|
+
- features/listing_jobs.feature
|
281
|
+
- features/manage_jobs.feature
|
282
|
+
- features/manage_slave_nodes.feature
|
283
|
+
- features/step_definitions/common_steps.rb
|
284
|
+
- features/step_definitions/fixture_project_steps.rb
|
285
|
+
- features/step_definitions/jenkins_steps.rb
|
286
|
+
- features/step_definitions/scm_steps.rb
|
287
|
+
- features/support/common.rb
|
288
|
+
- features/support/env.rb
|
289
|
+
- features/support/hooks.rb
|
290
|
+
- features/support/jenkins_helpers.rb
|
291
|
+
- features/support/matchers.rb
|
292
|
+
- spec/api_spec.rb
|
293
|
+
- spec/fixtures/ec2_global.config.xml
|
294
|
+
- spec/fixtures/erlang.single.config.xml
|
295
|
+
- spec/fixtures/rails.multi.config.xml
|
296
|
+
- spec/fixtures/rails.single.config.triggers.xml
|
297
|
+
- spec/fixtures/rails.single.config.xml
|
298
|
+
- spec/fixtures/ruby.multi-ruby-multi-labels.config.xml
|
299
|
+
- spec/fixtures/ruby.multi.config.xml
|
300
|
+
- spec/fixtures/ruby.single.config.xml
|
301
|
+
- spec/fixtures/therubyracer.config.xml
|
302
|
+
- spec/hash_key_cleaner_spec.rb
|
303
|
+
- spec/job_config_builder_spec.rb
|
304
|
+
- spec/spec_helper.rb
|
data/Gemfile.lock
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
jenkins (0.6.4)
|
5
|
-
builder (~> 2.1.2)
|
6
|
-
hpricot
|
7
|
-
httparty (~> 0.6.1)
|
8
|
-
json_pure (>= 1.5.1)
|
9
|
-
term-ansicolor (>= 1.0.4)
|
10
|
-
thor (~> 0.14.2)
|
11
|
-
|
12
|
-
GEM
|
13
|
-
remote: http://rubygems.org/
|
14
|
-
specs:
|
15
|
-
awesome_print (0.3.2)
|
16
|
-
builder (2.1.2)
|
17
|
-
crack (0.1.8)
|
18
|
-
cucumber (0.10.0)
|
19
|
-
builder (>= 2.1.2)
|
20
|
-
diff-lcs (~> 1.1.2)
|
21
|
-
gherkin (~> 2.3.2)
|
22
|
-
json (~> 1.4.6)
|
23
|
-
term-ansicolor (~> 1.0.5)
|
24
|
-
diff-lcs (1.1.2)
|
25
|
-
gherkin (2.3.4)
|
26
|
-
json (~> 1.4.6)
|
27
|
-
hpricot (0.8.4)
|
28
|
-
httparty (0.6.1)
|
29
|
-
crack (= 0.1.8)
|
30
|
-
jenkins-war (1.401)
|
31
|
-
json (1.4.6)
|
32
|
-
json_pure (1.5.1)
|
33
|
-
rake (0.8.7)
|
34
|
-
rspec (2.0.1)
|
35
|
-
rspec-core (~> 2.0.1)
|
36
|
-
rspec-expectations (~> 2.0.1)
|
37
|
-
rspec-mocks (~> 2.0.1)
|
38
|
-
rspec-core (2.0.1)
|
39
|
-
rspec-expectations (2.0.1)
|
40
|
-
diff-lcs (>= 1.1.2)
|
41
|
-
rspec-mocks (2.0.1)
|
42
|
-
rspec-core (~> 2.0.1)
|
43
|
-
rspec-expectations (~> 2.0.1)
|
44
|
-
term-ansicolor (1.0.5)
|
45
|
-
thor (0.14.6)
|
46
|
-
|
47
|
-
PLATFORMS
|
48
|
-
ruby
|
49
|
-
|
50
|
-
DEPENDENCIES
|
51
|
-
awesome_print
|
52
|
-
cucumber (~> 0.10.0)
|
53
|
-
jenkins!
|
54
|
-
jenkins-war (>= 1.396)
|
55
|
-
rake (~> 0.8.7)
|
56
|
-
rspec (~> 2.0.0)
|
@@ -1,16 +0,0 @@
|
|
1
|
-
Feature: Running a Jenkins Server
|
2
|
-
As a jenkins server administrator
|
3
|
-
I want to be able to easily control a jenkins server
|
4
|
-
In order to spend my time on how the process operates, not how to start stop and control it.
|
5
|
-
|
6
|
-
Scenario: Start a Jenkins Server (jenkins server)
|
7
|
-
Given env variable $HOME set to project path "home"
|
8
|
-
And "home/.jenkins" folder is deleted
|
9
|
-
And there is nothing listening on port 5001
|
10
|
-
And there is nothing listening on port 5002
|
11
|
-
And I cleanup any jenkins processes with control port 5002
|
12
|
-
When I run jenkins server with arguments "--port 5001 --control 5002 --daemon --logfile=server.log"
|
13
|
-
Then I should see a jenkins server on port 5001
|
14
|
-
And folder "home/.jenkins/server" is created
|
15
|
-
And folder "home/.jenkins/server/javatmp" is created
|
16
|
-
|