hudson 0.3.0.beta.8 → 0.3.0.beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/hudson.gemspec +1 -1
- data/lib/hudson.rb +1 -1
- data/lib/hudson/api.rb +2 -4
- data/lib/hudson/cli.rb +5 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/hudson.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{hudson}
|
5
|
-
s.version = "0.3.0.beta.
|
5
|
+
s.version = "0.3.0.beta.9"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Charles Lowell", "Dr Nic Williams"]
|
data/lib/hudson.rb
CHANGED
data/lib/hudson/api.rb
CHANGED
@@ -11,7 +11,7 @@ module Hudson
|
|
11
11
|
|
12
12
|
headers 'content-type' => 'application/json'
|
13
13
|
format :json
|
14
|
-
http_proxy 'localhost', '8888'
|
14
|
+
# http_proxy 'localhost', '8888'
|
15
15
|
|
16
16
|
JobAlreadyExistsError = Class.new(Exception)
|
17
17
|
|
@@ -41,9 +41,7 @@ module Hudson
|
|
41
41
|
res = post "/createItem/api/xml?name=#{CGI.escape(name)}", {
|
42
42
|
:body => job_config.to_xml, :format => :xml, :headers => { 'content-type' => 'application/xml' }
|
43
43
|
}
|
44
|
-
|
45
|
-
puts res.body
|
46
|
-
if res.code == 200
|
44
|
+
if res.code.to_i == 200
|
47
45
|
cache_base_uri
|
48
46
|
true
|
49
47
|
else
|
data/lib/hudson/cli.rb
CHANGED
@@ -49,13 +49,17 @@ module Hudson
|
|
49
49
|
desc "create project_path [options]", "create a build for your project"
|
50
50
|
common_options
|
51
51
|
method_option :override, :desc => "override if job exists", :type => :boolean, :default => false
|
52
|
+
method_option :assigned_node, :desc => "only use slave nodes with this label"
|
52
53
|
def create(project_path)
|
53
54
|
select_hudson_server(options)
|
54
55
|
FileUtils.chdir(project_path) do
|
55
56
|
unless scm = Hudson::ProjectScm.discover
|
56
57
|
error "Cannot determine project SCM. Currently supported: #{Hudson::ProjectScm.supported}"
|
57
58
|
end
|
58
|
-
job_config = Hudson::JobConfigBuilder.new(:rubygem)
|
59
|
+
job_config = Hudson::JobConfigBuilder.new(:rubygem) do |c|
|
60
|
+
c.scm = scm.url
|
61
|
+
c.assigned_node = options[:assigned_node] if options[:assigned_node]
|
62
|
+
end
|
59
63
|
name = File.basename(FileUtils.pwd)
|
60
64
|
begin
|
61
65
|
if Hudson::Api.create_job(name, job_config, options)
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hudson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196353
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 0.3.0.beta.
|
11
|
+
- 9
|
12
|
+
version: 0.3.0.beta.9
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Charles Lowell
|