#759: update status for BuildList::Item, fix getting logs
This commit is contained in:
parent
60f2ab3d96
commit
ef8ece3e87
|
@ -201,7 +201,7 @@ class BuildList < ActiveRecord::Base
|
|||
end
|
||||
|
||||
event :build_error do
|
||||
transition [:build_started, :build_canceled] => :build_error
|
||||
transition [:build_started, :build_canceled, :build_canceling] => :build_error
|
||||
end
|
||||
|
||||
HUMAN_STATUSES.each do |code,name|
|
||||
|
|
|
@ -7,14 +7,15 @@ class BuildList::Item < ActiveRecord::Base
|
|||
|
||||
GIT_ERROR = 5
|
||||
|
||||
STATUSES = [BuildServer::SUCCESS, BuildServer::DEPENDENCIES_ERROR, BuildServer::BUILD_ERROR, BuildServer::BUILD_STARTED, GIT_ERROR]
|
||||
STATUSES = [BuildServer::SUCCESS, BuildServer::DEPENDENCIES_ERROR, BuildServer::BUILD_ERROR, BuildServer::BUILD_STARTED, GIT_ERROR, BuildList::BUILD_CANCELED]
|
||||
HUMAN_STATUSES = {
|
||||
nil => :unknown,
|
||||
GIT_ERROR => :git_error,
|
||||
BuildServer::DEPENDENCIES_ERROR => :dependencies_error,
|
||||
BuildServer::SUCCESS => :success,
|
||||
BuildServer::BUILD_STARTED => :build_started,
|
||||
BuildServer::BUILD_ERROR => :build_error
|
||||
BuildServer::BUILD_ERROR => :build_error,
|
||||
BuildList::BUILD_CANCELED => :build_canceled
|
||||
}
|
||||
|
||||
scope :recent, order("level ASC, name ASC")
|
||||
|
|
|
@ -101,6 +101,7 @@ en:
|
|||
success: Build complete
|
||||
unknown: Build is waiting
|
||||
git_error: Git error
|
||||
build_canceled: Build canceled
|
||||
|
||||
statuses:
|
||||
build_lists: All
|
||||
|
|
|
@ -98,6 +98,7 @@ ru:
|
|||
success: собран
|
||||
unknown: ожидает сборки
|
||||
git_error: проблема с гит
|
||||
build_canceled: сборка отменена
|
||||
|
||||
statuses:
|
||||
build_lists: Всего
|
||||
|
|
|
@ -7,7 +7,7 @@ module AbfWorker
|
|||
|
||||
def abf_worker_log
|
||||
q = 'abfworker::'
|
||||
q << worker_queue
|
||||
q << worker_queue('-')
|
||||
q << '-'
|
||||
q << id.to_s
|
||||
Resque.redis.get(q) || I18n.t('layout.build_lists.log.not_available')
|
||||
|
@ -49,15 +49,18 @@ module AbfWorker
|
|||
|
||||
def live_inspector_queue
|
||||
q = 'abfworker::'
|
||||
q << worker_queue
|
||||
q << worker_queue('-')
|
||||
q << '-'
|
||||
q << id.to_s
|
||||
q << '::live-inspector'
|
||||
q
|
||||
end
|
||||
|
||||
def worker_queue
|
||||
is_a?(BuildList) ? 'rpm_worker' : 'iso_worker'
|
||||
def worker_queue(delimiter = '_')
|
||||
a = []
|
||||
a << (is_a?(BuildList) ? 'rpm' : 'iso')
|
||||
a << 'worker'
|
||||
a.join(delimiter)
|
||||
end
|
||||
|
||||
def worker_queue_class
|
||||
|
|
|
@ -25,6 +25,7 @@ module AbfWorker
|
|||
bl.start_build
|
||||
when BUILD_CANCELED
|
||||
bl.update_attributes({:status => BuildList::BUILD_CANCELED})
|
||||
item.update_attributes({:status => BuildList::BUILD_CANCELED})
|
||||
end
|
||||
if status != BUILD_STARTED
|
||||
fill_container_data bl, options
|
||||
|
|
Loading…
Reference in New Issue