Class: Backend::Api::BuildResults::Binaries
- Inherits:
-
Object
- Object
- Backend::Api::BuildResults::Binaries
- Extended by:
- ConnectionHelper
- Defined in:
- api/build_results/binaries.rb
Overview
Class that connect to endpoints related to binaries
Class Method Summary collapse
-
.available_in_project(project_name) ⇒ Hash
Returns the available binaries for the project.
-
.available_in_repositories(project_name, repository_urls, repository_paths) ⇒ Hash
Returns the available binaries for the repositories given.
-
.build_dependency_info(project_name, package_name, repository_name, architecture_name) ⇒ String
Returns the build dependency information.
-
.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.
-
.files(project_name, repository_name, architecture_name, package_name) ⇒ String
Returns a file list of binaries.
-
.job_history(project_name, repository_name, architecture_name) ⇒ String
Returns the jobs history for a project.
-
.rpmlint_log(project_name, package_name, repository_name, architecture_name) ⇒ String
Returns the RPMlint log.
Class Method Details
.available_in_project(project_name) ⇒ Hash
Returns the available binaries for the project
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
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
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
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
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
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
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 |