Class: Backend::Api::BuildResults::Binaries

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

Overview

Class that connect to endpoints related to binaries

Class Method Summary collapse

Class Method Details

.available_in_project(project_name) ⇒ Hash

Returns the available binaries for the project

Returns:

  • (Hash)


43
44
45
# File 'api/build_results/binaries.rb', line 43

def self.available_in_project(project_name)
  transform_binary_packages_response(get(["/build/:project/_availablebinaries", project_name]))
end

.available_in_repositories(project_name, repository_urls, repository_paths) ⇒ Hash

Returns the available binaries for the repositories given

Parameters:

  • repository_urls (Array)

    Absolute urls of repositories.

  • repository_paths (Array)

    Paths of local repositories in the form of project/repository.

Returns:

  • (Hash)


51
52
53
54
55
# File 'api/build_results/binaries.rb', line 51

def self.available_in_repositories(project_name , repository_urls, repository_paths)
  return {} if repositories.empty? && urls.empty?
  transform_binary_packages_response(get(["/build/:project/_availablebinaries", project],
                                         params: { url: repository_urls, path: repository_paths }, expand: [:url, :path]))
end

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

Returns the build dependency information

Returns:

  • (String)


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

def self.build_dependency_info(project_name, package_name, repository_name, architecture_name)
  get(["/build/:project/:repository/:architecture/_builddepinfo", project_name, repository_name, architecture_name],
      params: { package: package_name, view: :pkgnames })
end

.download_url_for_file(project_name, repository_name, package_name, architecture_name, file_name) ⇒ String

Returns the download url (published path) for a file of a package

Returns:

  • (String)


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

def self.download_url_for_file(project_name, repository_name, package_name, architecture_name, file_name)
  get(["/build/:project/:repository/:architecture/:package/:file", project_name, repository_name, architecture_name, package_name, file_name],
      params: { view: :publishedpath })
end

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

Returns a file list of binaries

Returns:

  • (String)


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

def self.files(project_name, repository_name, architecture_name, package_name)
  get(["/build/:project/:repository/:architecture/:package", project_name, repository_name, architecture_name, package_name])
end

.job_history(project_name, repository_name, architecture_name) ⇒ String

Returns the jobs history for a project

Returns:

  • (String)


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

def self.job_history(project_name, repository_name, architecture_name)
  get(["/build/:project/:repository/:architecture/_jobhistory", project_name, repository_name, architecture_name],
      params: { code: :lastfailures })
end

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

Returns the RPMlint log

Returns:

  • (String)


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

def self.rpmlint_log(project_name, package_name, repository_name, architecture_name)
  get(["/build/:project/:repository/:architecture/:package/rpmlint.log", project_name, repository_name, architecture_name, package_name])
end