Class: Backend::Api::BuildResults::Status

Inherits:
Object
  • Object
show all
Extended by:
ConnectionHelper
Defined in:
api/build_results/status.rb

Overview

Class that connect to endpoints related to status of builds

Class Method Summary collapse

Class Method Details

.build_log_size(project_name, package_name, repository_name, architecture_name) ⇒ String

Returns the log's size for a build

Returns:

  • (String)


30
31
32
33
# File 'api/build_results/status.rb', line 30

def self.build_log_size(project_name, package_name, repository_name, architecture_name)
  http_get(['/build/:project/:repository/:architecture/:package/_log', project_name, repository_name, architecture_name, package_name],
           params: { view: :entry })
end

.build_problems(project_name) ⇒ String

Returns the the problems for a build

Returns:

  • (String)


37
38
39
# File 'api/build_results/status.rb', line 37

def self.build_problems(project_name)
  http_get(['/build/:project/_result', project_name], params: { view: :status, code: [:failed, :broken, :unresolvable] }, expand: [:code])
end

.build_result(project_name, package_name, repository_name, architecture_name) ⇒ String

Returns the result view for a build

Returns:

  • (String)


23
24
25
26
# File 'api/build_results/status.rb', line 23

def self.build_result(project_name, package_name, repository_name, architecture_name)
  http_get(['/build/:project/_result', project_name],
           params: { view: :status, package: package_name, arch: architecture_name, repository: repository_name })
end

.job_status(project_name, package_name, repository_name, architecture_name) ⇒ String

Returns the job status of a build

Returns:

  • (String)


17
18
19
# File 'api/build_results/status.rb', line 17

def self.job_status(project_name, package_name, repository_name, architecture_name)
  http_get(['/build/:project/:repository/:architecture/:package/_jobstatus', project_name, repository_name, architecture_name, package_name])
end

.log_chunk(project_name, package_name, repository_name, architecture_name, starting_line, ending_line) ⇒ String

Returns a chunk of the build's log

Returns:

  • (String)


10
11
12
13
# File 'api/build_results/status.rb', line 10

def self.log_chunk(project_name, package_name, repository_name, architecture_name, starting_line, ending_line)
  endpoint = ['/build/:project/:repository/:architecture/:package/_log', project_name, repository_name, architecture_name, package_name]
  http_get(endpoint, params: { nostream: 1, start: starting_line.to_i, end: ending_line.to_i })
end

.version_releases(project_name) ⇒ Object

Returns the versions of the releases for the project



42
43
44
# File 'api/build_results/status.rb', line 42

def self.version_releases(project_name)
  http_get(['/build/:project/_result', project_name], params: { view: :versrel })
end