Class: LabClient::Job
Overview
Instance Attribute Summary
Attributes inherited from Klass
#client, #response
Attributes inherited from LabStruct
#response
Instance Method Summary
collapse
#has?, #keys, #raw
Methods inherited from Klass
#api_methods, #collect_project_id, #collect_release_id, #collect_repository_id, date_time_attrs, #format_time?, #group_name, #help, #initialize, #klass, #success?, #to_json, #update_self, user_attrs, #valid_group_project_levels, #verbose
Methods included from Docs
#demo, #desc, #doc, docs, #example, #group_name, #help, json, #markdown, #navigation, #option, #result, #subtitle, #title
Methods included from CurlHelper
#curl
Methods inherited from LabStruct
#as_json, #client, #keys, #slice, #success?
Instance Method Details
#artifacts(file_path = nil, job_token = nil) ⇒ Object
20
21
22
23
|
# File 'lib/labclient/jobs/job.rb', line 20
def artifacts(file_path = nil, job_token = nil)
project_id = collect_project_id
client.jobs.artifacts(project_id, id, file_path, job_token)
end
|
#artifacts_path(artifacts_path, file_path = nil) ⇒ Object
25
26
27
28
|
# File 'lib/labclient/jobs/job.rb', line 25
def artifacts_path(artifacts_path, file_path = nil)
project_id = collect_project_id
client.jobs.artifacts_path(project_id, id, artifacts_path, file_path)
end
|
#cancel ⇒ Object
35
36
37
38
|
# File 'lib/labclient/jobs/job.rb', line 35
def cancel
project_id = collect_project_id
client.jobs.cancel(project_id, id)
end
|
#delete ⇒ Object
55
56
57
58
|
# File 'lib/labclient/jobs/job.rb', line 55
def delete
project_id = collect_project_id
client.jobs.delete(project_id, id)
end
|
#erase ⇒ Object
45
46
47
48
|
# File 'lib/labclient/jobs/job.rb', line 45
def erase
project_id = collect_project_id
client.jobs.erase(project_id, id)
end
|
#inspect ⇒ Object
7
8
9
|
# File 'lib/labclient/jobs/job.rb', line 7
def inspect
"#<Job id: #{id}, status: #{status}, stage: #{stage}>"
end
|
#keep ⇒ Object
50
51
52
53
|
# File 'lib/labclient/jobs/job.rb', line 50
def keep
project_id = collect_project_id
client.jobs.keep(project_id, id)
end
|
#pipeline ⇒ Object
16
17
18
|
# File 'lib/labclient/jobs/job.rb', line 16
def pipeline
Pipeline.new(@table[:pipeline], response, client)
end
|
#play ⇒ Object
60
61
62
63
|
# File 'lib/labclient/jobs/job.rb', line 60
def play
project_id = collect_project_id
client.jobs.play(project_id, id)
end
|
#project ⇒ Object
11
12
13
14
|
# File 'lib/labclient/jobs/job.rb', line 11
def project
project_id = collect_project_id
client.projects.show(project_id)
end
|
#retry ⇒ Object
40
41
42
43
|
# File 'lib/labclient/jobs/job.rb', line 40
def retry
project_id = collect_project_id
client.jobs.retry(project_id, id)
end
|
#trace ⇒ Object
30
31
32
33
|
# File 'lib/labclient/jobs/job.rb', line 30
def trace
project_id = collect_project_id
client.jobs.trace(project_id, id)
end
|