Class: LabClient::Job
Overview
Instance Attribute Summary
Attributes inherited from Klass
#client
Attributes inherited from LabStruct
#response, #table
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, #quiet?, #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 included from Logger
#logger, logger, logger_setup
Methods inherited from LabStruct
#[], #[]=, #as_json, #client, #initialize, #key?, #keys, #method_missing, #respond_to_missing?, #slice, #success?, #to_h
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class LabClient::LabStruct
Instance Method Details
#artifacts_path(artifacts_path, file_path = nil) ⇒ Object
32
33
34
35
|
# File 'lib/labclient/jobs/job.rb', line 32
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
42
43
44
45
|
# File 'lib/labclient/jobs/job.rb', line 42
def cancel
project_id = collect_project_id
client.jobs.cancel(project_id, id)
end
|
#delete ⇒ Object
62
63
64
65
|
# File 'lib/labclient/jobs/job.rb', line 62
def delete
project_id = collect_project_id
client.jobs.delete(project_id, id)
end
|
#download_artifacts(file_path = nil, job_token = nil) ⇒ Object
21
22
23
24
|
# File 'lib/labclient/jobs/job.rb', line 21
def download_artifacts(file_path = nil, job_token = nil)
project_id = collect_project_id
client.jobs.download_artifacts(project_id, id, job_token, file_path)
end
|
#erase ⇒ Object
52
53
54
55
|
# File 'lib/labclient/jobs/job.rb', line 52
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
57
58
59
60
|
# File 'lib/labclient/jobs/job.rb', line 57
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
67
68
69
70
|
# File 'lib/labclient/jobs/job.rb', line 67
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
47
48
49
50
|
# File 'lib/labclient/jobs/job.rb', line 47
def retry
project_id = collect_project_id
client.jobs.retry(project_id, id)
end
|
#show_artifacts(job_token = nil) ⇒ Object
27
28
29
30
|
# File 'lib/labclient/jobs/job.rb', line 27
def show_artifacts(job_token = nil)
project_id = collect_project_id
client.jobs.artifacts(project_id, id, job_token)
end
|
#trace ⇒ Object
37
38
39
40
|
# File 'lib/labclient/jobs/job.rb', line 37
def trace
project_id = collect_project_id
client.jobs.trace(project_id, id)
end
|