hudson-remote-api 0.7.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +20 -0
- data/README.md +11 -9
- data/Rakefile +10 -0
- data/fixtures/vcr_cassettes/TestHudsonBuildQueue_test_list.yml +38 -0
- data/fixtures/vcr_cassettes/TestHudsonBuild_setup.yml +407 -0
- data/fixtures/vcr_cassettes/TestHudsonBuild_test_build_info.yml +222 -0
- data/fixtures/vcr_cassettes/TestHudsonClient_test_build_job_.yml +52 -0
- data/fixtures/vcr_cassettes/TestHudsonClient_test_build_job_with_parameters_.yml +52 -0
- data/fixtures/vcr_cassettes/TestHudsonClient_test_build_queue_info.yml +38 -0
- data/fixtures/vcr_cassettes/TestHudsonClient_test_create_item_.yml +52 -0
- data/fixtures/vcr_cassettes/TestHudsonClient_test_delete_job_.yml +52 -0
- data/fixtures/vcr_cassettes/TestHudsonClient_test_job_build_info.yml +39 -0
- data/fixtures/vcr_cassettes/TestHudsonClient_test_job_config_info.yml +48 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_build.yml +409 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_build_with_params.yml +189 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_builds_list.yml +192 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_copy.yml +410 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_create.yml +257 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_desc_update.yml +281 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_get.yml +191 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_job_with_spaces.yml +260 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_list.yml +39 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_list_active.yml +39 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_new.yml +561 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_scm_url.yml +728 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_triggers_delete.yml +588 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_triggers_set.yml +346 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_triggers_set_using_shortcut.yml +346 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_url.yml +156 -0
- data/fixtures/vcr_cassettes/TestHudsonJob_test_wipe_out_workspace.yml +685 -0
- data/hudson-remote-api.gemspec +23 -0
- data/lib/hudson-remote-api.rb +3 -128
- data/lib/hudson-remote-api/build.rb +18 -35
- data/lib/hudson-remote-api/build_queue.rb +13 -20
- data/lib/hudson-remote-api/client.rb +179 -0
- data/lib/hudson-remote-api/hudson_xml_api.rb +61 -0
- data/lib/hudson-remote-api/job.rb +207 -345
- data/lib/hudson-remote-api/parser/build_info.rb +37 -0
- data/lib/hudson-remote-api/parser/build_queue_info.rb +19 -0
- data/lib/hudson-remote-api/parser/job_config_info.rb +99 -0
- data/lib/hudson-remote-api/parser/job_info.rb +62 -0
- data/lib/hudson-remote-api/parser/multicast.rb +28 -0
- data/lib/hudson-remote-api/parser/server_info.rb +49 -0
- data/lib/hudson-remote-api/settings.rb +31 -0
- data/lib/hudson-remote-api/version.rb +3 -0
- data/lib/hudson-remote-api/xml_writer/job_config_info.rb +113 -0
- data/test/test_helper.rb +10 -0
- data/test/test_hudson_build.rb +28 -0
- data/test/test_hudson_build_queue.rb +11 -0
- data/test/test_hudson_client.rb +65 -0
- data/test/test_hudson_job.rb +162 -0
- data/test/test_hudson_multicast.rb +9 -0
- data/test/test_hudson_settings.rb +70 -0
- metadata +71 -53
- data/lib/hudson-remote-api/config.rb +0 -46
@@ -1,348 +1,210 @@
|
|
1
1
|
module Hudson
|
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
|
-
response = send_post_request(@@xml_api_create_item_path, {:name=>new_job, :mode=>"copy", :from=>@name})
|
190
|
-
raise(APIError, "Error copying job #{@name}: #{response.body}") if response.class != Net::HTTPFound
|
191
|
-
Job.new(new_job)
|
192
|
-
end
|
193
|
-
|
194
|
-
# Update the job configuration on Hudson server
|
195
|
-
def update(config=nil)
|
196
|
-
@config = config if !config.nil?
|
197
|
-
response = send_xml_post_request(@xml_api_config_path, @config)
|
198
|
-
response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)
|
199
|
-
end
|
200
|
-
|
201
|
-
# Set the repository url and update on Hudson server
|
202
|
-
def repository_url=(repository_url)
|
203
|
-
#return false if @repository_url.nil?
|
204
|
-
|
205
|
-
@repository_url = repository_url
|
206
|
-
|
207
|
-
if @git
|
208
|
-
if repository_url[:url]
|
209
|
-
@config_doc.elements['/project/scm/userRemoteConfigs/hudson.plugins.git.UserRemoteConfig/url'].text = repository_url[:url]
|
210
|
-
end
|
211
|
-
if repository_url[:branch]
|
212
|
-
@config_doc.elements['/project/scm/branches/hudson.plugins.git.BranchSpec/name'].text = repository_url[:branch]
|
213
|
-
end
|
214
|
-
else
|
215
|
-
if @config_doc.elements["/project/scm"].attributes['class'] == "hudson.scm.NullSCM"
|
216
|
-
@config_doc.elements["/project/scm"].replace_with REXML::Document.new(SVN_SCM_CONF % repository_url)
|
217
|
-
else
|
218
|
-
@config_doc.elements["/project/scm/locations/hudson.scm.SubversionSCM_-ModuleLocation/remote"].text = repository_url
|
219
|
-
end
|
220
|
-
end
|
221
|
-
|
222
|
-
@config = @config_doc.to_s
|
223
|
-
update
|
224
|
-
end
|
225
|
-
|
226
|
-
def repository_urls=(repository_urls)
|
227
|
-
return false if !repository_urls.class == Array
|
228
|
-
@repository_urls = repository_urls
|
229
|
-
|
230
|
-
i = 0
|
231
|
-
@config_doc.elements.each("/project/scm/locations/hudson.scm.SubversionSCM_-ModuleLocation") do |location|
|
232
|
-
location.elements["remote"].text = @repository_urls[i]
|
233
|
-
i += 1
|
234
|
-
end
|
235
|
-
|
236
|
-
@config = @config_doc.to_s
|
237
|
-
update
|
238
|
-
end
|
239
|
-
|
240
|
-
# Set the repository browser location and update on Hudson server
|
241
|
-
def repository_browser_location=(repository_browser_location)
|
242
|
-
@repository_browser_location = repository_browser_location
|
243
|
-
if @git
|
244
|
-
@config_doc.elements['/project/scm/browser/url'].text = repository_browser_location
|
245
|
-
else
|
246
|
-
@config_doc.elements["/project/scm/browser/location"].text = repository_browser_location
|
247
|
-
end
|
248
|
-
@config = @config_doc.to_s
|
249
|
-
update
|
250
|
-
end
|
251
|
-
|
252
|
-
# Set the job description and update on Hudson server
|
253
|
-
def description=(description)
|
254
|
-
@description = description
|
255
|
-
@config_doc.elements["/project"] << REXML::Element.new("description") if @config_doc.elements["/project/description"].nil?
|
256
|
-
|
257
|
-
@config_doc.elements["/project/description"].text = description
|
258
|
-
@config = @config_doc.to_s
|
259
|
-
update
|
260
|
-
end
|
261
|
-
|
262
|
-
def generate_trigger trigger, spec_text
|
263
|
-
spec = REXML::Element.new("spec")
|
264
|
-
spec.text = spec_text.to_s
|
265
|
-
trigger.elements << spec
|
266
|
-
trigger
|
267
|
-
end
|
268
|
-
private :generate_trigger
|
269
|
-
|
270
|
-
def triggers= opts={}
|
271
|
-
opts = {} if opts.nil?
|
272
|
-
if triggers = @config_doc.elements["/project/triggers[@class='vector']"]
|
273
|
-
triggers.elements.delete_all '*'
|
274
|
-
opts.each do |key, value|
|
275
|
-
trigger_name = key.to_s
|
276
|
-
trigger_name = 'hudson.triggers.' + trigger_name unless Regexp.new(/^hudson\.triggers\./).match(trigger_name)
|
277
|
-
if trigger = triggers.elements[trigger_name]
|
278
|
-
if spec = trigger.elements['spec']
|
279
|
-
spec.text = value.to_s
|
280
|
-
else
|
281
|
-
triggers.elements << generate_trigger(trigger, value)
|
282
|
-
end
|
283
|
-
else
|
284
|
-
triggers.elements << generate_trigger(REXML::Element.new(trigger_name), value)
|
285
|
-
end
|
286
|
-
end
|
287
|
-
# Todo: before calling update, @config need to be assigned with @config_doc.to_s,
|
288
|
-
# let it be done by update.
|
289
|
-
@config = @config_doc.to_s
|
290
|
-
update
|
291
|
-
else
|
292
|
-
$stderr.puts "triggers not found in configuration, triggers assignment ignored."
|
293
|
-
end
|
294
|
-
end
|
295
|
-
|
296
|
-
def triggers
|
297
|
-
results = {}
|
298
|
-
if triggers = @config_doc.elements["/project/triggers[@class='vector']"]
|
299
|
-
triggers.elements.to_a.each do |trigger|
|
300
|
-
spec_text = trigger.elements['spec'].text
|
301
|
-
results[trigger.name.to_s] = spec_text.to_s
|
302
|
-
end
|
303
|
-
end
|
304
|
-
results
|
305
|
-
end
|
306
|
-
|
307
|
-
def url
|
308
|
-
File.join( Hudson[:url], 'job', name) + '/'
|
309
|
-
end
|
310
|
-
|
311
|
-
# Start building this job on Hudson server
|
312
|
-
def build(params={})
|
313
|
-
if @parameterized_job
|
314
|
-
response = send_post_request(@xml_api_build_with_params_path, {:delay => '0sec'}.merge(params))
|
315
|
-
else
|
316
|
-
response = send_post_request(@xml_api_build_path, {:delay => '0sec'})
|
317
|
-
end
|
318
|
-
response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)
|
319
|
-
end
|
320
|
-
|
321
|
-
def disable()
|
322
|
-
response = send_post_request(@xml_api_disable_path)
|
323
|
-
response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)
|
324
|
-
end
|
325
|
-
|
326
|
-
def enable()
|
327
|
-
response = send_post_request(@xml_api_enable_path)
|
328
|
-
response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)
|
329
|
-
end
|
330
|
-
|
331
|
-
# Delete this job from Hudson server
|
332
|
-
def delete()
|
333
|
-
response = send_post_request(@xml_api_delete_path)
|
334
|
-
response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)
|
335
|
-
end
|
336
|
-
|
337
|
-
def wipe_out_workspace()
|
338
|
-
wait_for_build_to_finish
|
339
|
-
|
340
|
-
if !active?
|
341
|
-
response = send_post_request(@xml_api_wipe_out_workspace_path)
|
342
|
-
else
|
343
|
-
response = false
|
344
|
-
end
|
345
|
-
response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)
|
346
|
-
end
|
2
|
+
# This class provides an interface to Hudson jobs
|
3
|
+
class Job
|
4
|
+
attr_accessor :name, :config, :repository_url, :repository_urls, :repository_browser_location, :description, :parameterized_job
|
5
|
+
|
6
|
+
# Class methods
|
7
|
+
class <<self
|
8
|
+
# List all Hudson jobs
|
9
|
+
def list()
|
10
|
+
xml = Hudson.client.server_info
|
11
|
+
server_info_parser = Hudson::Parser::ServerInfo.new(xml)
|
12
|
+
|
13
|
+
server_info_parser.jobs
|
14
|
+
end
|
15
|
+
|
16
|
+
# List all jobs in active execution
|
17
|
+
def list_active
|
18
|
+
xml = Hudson.client.server_info
|
19
|
+
server_info_parser = Hudson::Parser::ServerInfo.new(xml)
|
20
|
+
|
21
|
+
server_info_parser.active_jobs
|
22
|
+
end
|
23
|
+
|
24
|
+
def get(job_name)
|
25
|
+
job_name.strip!
|
26
|
+
list.include?(job_name) ? Job.new(job_name) : nil
|
27
|
+
end
|
28
|
+
|
29
|
+
def create(name, config=nil)
|
30
|
+
config ||= File.open(File.dirname(__FILE__) + '/new_job_config.xml').read
|
31
|
+
response = Hudson.client.create_item!({:name=>name, :mode=>"hudson.model.FreeStyleProject", :config=>config})
|
32
|
+
raise(APIError, "Error creating job #{name}: #{response.body}") if response.class != Net::HTTPFound
|
33
|
+
Job.get(name)
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
# Instance methods
|
39
|
+
def initialize(name, config=nil)
|
40
|
+
name.strip!
|
41
|
+
# Creates the job in Hudson if it doesn't already exist
|
42
|
+
@name = Job.list.include?(name) ? name : Job.create(name, config).name
|
43
|
+
load_config
|
44
|
+
self
|
45
|
+
end
|
46
|
+
|
47
|
+
# Load data from Hudson's Job configuration settings into class variables
|
48
|
+
def load_config
|
49
|
+
@config = Hudson.client.job_config_info(self.name)
|
50
|
+
@config_info_parser = Hudson::Parser::JobConfigInfo.new(@config)
|
51
|
+
@config_writer = Hudson::XmlWriter::JobConfigInfo.new(self.name, @config)
|
52
|
+
|
53
|
+
@info = Hudson.client.job_info(self.name)
|
54
|
+
@job_info_parser = Hudson::Parser::JobInfo.new(@info)
|
55
|
+
|
56
|
+
@description = @config_info_parser.description
|
57
|
+
@parameterized_job = @config_info_parser.parameterized?
|
58
|
+
@git = @config_info_parser.git_repo?
|
59
|
+
@repository_url = @git ? @config_info_parser.git_repository : @config_info_parser.svn_repository
|
60
|
+
@repostory_urls = @config_info_parser.svn_repository_urls
|
61
|
+
@repository_browser_location = @config_info_parser.scm_broswer_location
|
62
|
+
end
|
63
|
+
alias :reload_config :load_config
|
64
|
+
|
65
|
+
def free_style_project?
|
66
|
+
@free_style_project ||= @job_info_parser.free_style_project?
|
67
|
+
end
|
68
|
+
|
69
|
+
def color
|
70
|
+
@color ||= @job_info_parser.color
|
71
|
+
end
|
72
|
+
|
73
|
+
def last_build
|
74
|
+
@job_info_parser.last_build
|
75
|
+
end
|
76
|
+
|
77
|
+
def last_completed_build
|
78
|
+
@job_info_parser.last_completed_build
|
79
|
+
end
|
80
|
+
|
81
|
+
def last_failed_build
|
82
|
+
@job_info_parser.last_failed_build
|
83
|
+
end
|
84
|
+
|
85
|
+
def last_stable_build
|
86
|
+
@job_info_parser.last_stable_build
|
87
|
+
end
|
88
|
+
|
89
|
+
def last_successful_build
|
90
|
+
@job_info_parser.last_successful_build
|
91
|
+
end
|
92
|
+
|
93
|
+
def last_unsuccessful_build
|
94
|
+
@job_info_parser.last_unsuccessful_build
|
95
|
+
end
|
96
|
+
|
97
|
+
def next_build_number
|
98
|
+
@job_info_parser.next_build_number
|
99
|
+
end
|
100
|
+
|
101
|
+
def builds_list
|
102
|
+
@job_info_parser.builds
|
103
|
+
end
|
104
|
+
|
105
|
+
def active?
|
106
|
+
Job.list_active.include?(self.name)
|
107
|
+
end
|
108
|
+
|
109
|
+
def wait_for_build_to_finish(poll_freq=10)
|
110
|
+
loop do
|
111
|
+
puts "waiting for all #{@name} builds to finish"
|
112
|
+
sleep poll_freq # wait
|
113
|
+
break if !active? and !BuildQueue.list.include?(@name)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
# Create a new job on Hudson server based on the current job object
|
118
|
+
def copy(new_job=nil)
|
119
|
+
new_job = "copy_of_#{@name}" if new_job.nil?
|
120
|
+
response = Hudson.client.create_item!({:name=>new_job, :mode=>"copy", :from=>@name})
|
121
|
+
raise(APIError, "Error copying job #{@name}: #{response.body}") if response.class != Net::HTTPFound
|
122
|
+
Job.new(new_job)
|
123
|
+
end
|
124
|
+
|
125
|
+
# Set the repository url and update on Hudson server
|
126
|
+
def repository_url=(repository_url)
|
127
|
+
#return false if @repository_url.nil?
|
128
|
+
if @git
|
129
|
+
@config_writer.git_repository_url = repository_url
|
130
|
+
else
|
131
|
+
@config_writer.svn_repository_url = repository_url
|
132
|
+
end
|
133
|
+
reload_config
|
134
|
+
end
|
135
|
+
|
136
|
+
def repository_urls=(repository_urls)
|
137
|
+
@config_writer.repository_urls = repository_urls
|
138
|
+
reload_config
|
139
|
+
end
|
140
|
+
|
141
|
+
# Set the repository browser location and update on Hudson server
|
142
|
+
def repository_browser_location=(repository_browser_location)
|
143
|
+
if @git
|
144
|
+
@config_writer.git_repository_browser_location = repository_browser_location
|
145
|
+
else
|
146
|
+
@config_writer.svn_repository_browser_location = repository_browser_location
|
147
|
+
end
|
148
|
+
reload_config
|
149
|
+
end
|
150
|
+
|
151
|
+
# Set the job description and update on Hudson server
|
152
|
+
def description=(description)
|
153
|
+
@config_writer.description = description
|
154
|
+
reload_config
|
155
|
+
end
|
156
|
+
|
157
|
+
def triggers= opts={}
|
158
|
+
@config_writer.triggers = opts
|
159
|
+
reload_config
|
160
|
+
end
|
161
|
+
|
162
|
+
def triggers
|
163
|
+
@config_info_parser.triggers
|
164
|
+
end
|
165
|
+
|
166
|
+
#def url
|
167
|
+
# File.join( Hudson[:url], 'job', self.name) + '/'
|
168
|
+
#end
|
169
|
+
|
170
|
+
# Start building this job on Hudson server
|
171
|
+
def build(params={})
|
172
|
+
if @parameterized_job
|
173
|
+
response = Hudson.client.build_job_with_parameters!(self.name, params)
|
174
|
+
else
|
175
|
+
response = Hudson.client.build_job!(self.name)
|
176
|
+
end
|
177
|
+
response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)
|
178
|
+
end
|
179
|
+
|
180
|
+
def disable()
|
181
|
+
response = Hudson.client.disable_job!(self.name)
|
182
|
+
response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)
|
183
|
+
end
|
184
|
+
|
185
|
+
def enable()
|
186
|
+
response = Hudson.client.enable_job!(self.name)
|
187
|
+
response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)
|
347
188
|
end
|
189
|
+
|
190
|
+
# Delete this job from Hudson server
|
191
|
+
def delete()
|
192
|
+
response = Hudson.client.delete_job!(self.name)
|
193
|
+
response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)
|
194
|
+
end
|
195
|
+
|
196
|
+
def wipe_out_workspace()
|
197
|
+
wait_for_build_to_finish
|
198
|
+
|
199
|
+
if !active?
|
200
|
+
response = Hudson.client.wipeout_job_workspace!(self.name)
|
201
|
+
else
|
202
|
+
response = false
|
203
|
+
end
|
204
|
+
response.is_a?(Net::HTTPSuccess) or response.is_a?(Net::HTTPRedirection)
|
205
|
+
end
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
end
|
348
210
|
end
|