Merge pull request #25 from warpc/24-update_build_status
24 update build status
This commit is contained in:
commit
5815ef46ec
|
@ -17,36 +17,39 @@ class BuildList < ActiveRecord::Base
|
||||||
errors.add(:bpl, I18n.t('flash.build_list.can_not_published')) if status == BUILD_PUBLISHED && status_was != BuildServer::SUCCESS
|
errors.add(:bpl, I18n.t('flash.build_list.can_not_published')) if status == BUILD_PUBLISHED && status_was != BuildServer::SUCCESS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# The kernel does not send these statuses directly
|
||||||
BUILD_CANCELED = 5000
|
BUILD_CANCELED = 5000
|
||||||
WAITING_FOR_RESPONSE = 4000
|
WAITING_FOR_RESPONSE = 4000
|
||||||
BUILD_PENDING = 2000
|
BUILD_PENDING = 2000
|
||||||
BUILD_STARTED = 3000
|
|
||||||
BUILD_PUBLISHED = 6000
|
BUILD_PUBLISHED = 6000
|
||||||
TEST_FAILD = 21
|
|
||||||
|
|
||||||
STATUSES = [WAITING_FOR_RESPONSE,
|
STATUSES = [ WAITING_FOR_RESPONSE,
|
||||||
BuildServer::SUCCESS,
|
BUILD_CANCELED,
|
||||||
BUILD_PENDING,
|
BUILD_PENDING,
|
||||||
BUILD_STARTED,
|
BUILD_PUBLISHED,
|
||||||
BuildServer::BUILD_ERROR,
|
BuildServer::SUCCESS,
|
||||||
BuildServer::PLATFORM_NOT_FOUND,
|
BuildServer::BUILD_STARTED,
|
||||||
BuildServer::PLATFORM_PENDING,
|
BuildServer::BUILD_ERROR,
|
||||||
BuildServer::PROJECT_NOT_FOUND,
|
BuildServer::PLATFORM_NOT_FOUND,
|
||||||
BuildServer::PROJECT_VERSION_NOT_FOUND,
|
BuildServer::PLATFORM_PENDING,
|
||||||
BUILD_CANCELED,
|
BuildServer::PROJECT_NOT_FOUND,
|
||||||
TEST_FAILD]
|
BuildServer::PROJECT_VERSION_NOT_FOUND,
|
||||||
|
BuildServer::BINARY_TEST_FAILED,
|
||||||
|
BuildServer::DEPENDENCY_TEST_FAILED ]
|
||||||
|
|
||||||
HUMAN_STATUSES = { BuildServer::BUILD_ERROR => :build_error,
|
HUMAN_STATUSES = { WAITING_FOR_RESPONSE => :waiting_for_response,
|
||||||
|
BUILD_CANCELED => :build_canceled
|
||||||
BUILD_PENDING => :build_pending,
|
BUILD_PENDING => :build_pending,
|
||||||
BUILD_STARTED => :build_started,
|
BUILD_PUBLISHED => :build_published,
|
||||||
|
BuildServer::BUILD_ERROR => :build_error,
|
||||||
|
BuildServer::BUILD_STARTED => :build_started,
|
||||||
BuildServer::SUCCESS => :success,
|
BuildServer::SUCCESS => :success,
|
||||||
WAITING_FOR_RESPONSE => :waiting_for_response,
|
|
||||||
BuildServer::PLATFORM_NOT_FOUND => :platform_not_found,
|
BuildServer::PLATFORM_NOT_FOUND => :platform_not_found,
|
||||||
BuildServer::PLATFORM_PENDING => :platform_pending,
|
BuildServer::PLATFORM_PENDING => :platform_pending,
|
||||||
BuildServer::PROJECT_NOT_FOUND => :project_not_found,
|
BuildServer::PROJECT_NOT_FOUND => :project_not_found,
|
||||||
BuildServer::PROJECT_VERSION_NOT_FOUND => :project_version_not_found,
|
BuildServer::PROJECT_VERSION_NOT_FOUND => :project_version_not_found,
|
||||||
TEST_FAILD => :testing_faild,
|
BuildServer::DEPENDENCY_TEST_FAILED => :dependency_test_failed,
|
||||||
BUILD_CANCELED => :build_canceled
|
BuildServer::BINARY_TEST_FAILED => :binary_test_failed,
|
||||||
}
|
}
|
||||||
|
|
||||||
scope :recent, order("updated_at DESC")
|
scope :recent, order("updated_at DESC")
|
||||||
|
|
|
@ -3,11 +3,12 @@ class BuildList::Item < ActiveRecord::Base
|
||||||
|
|
||||||
attr_protected :build_list_id
|
attr_protected :build_list_id
|
||||||
|
|
||||||
STATUSES = [BuildServer::SUCCESS, BuildServer::DEPENDENCIES_FAIL, BuildServer::BUILD_ERROR]
|
STATUSES = [BuildServer::SUCCESS, BuildServer::DEPENDENCIES_ERROR, BuildServer::BUILD_ERROR, BuildServer::BUILD_STARTED]
|
||||||
HUMAN_STATUSES = {
|
HUMAN_STATUSES = {
|
||||||
nil => :unknown,
|
nil => :unknown,
|
||||||
BuildServer::DEPENDENCIES_FAIL => :dependencies_fail,
|
BuildServer::DEPENDENCIES_ERROR => :dependencies_error,
|
||||||
BuildServer::SUCCESS => :success,
|
BuildServer::SUCCESS => :success,
|
||||||
|
BuildServer::BUILD_STARTED => :build_started,
|
||||||
BuildServer::BUILD_ERROR => :build_error
|
BuildServer::BUILD_ERROR => :build_error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -300,16 +300,18 @@ ru:
|
||||||
items:
|
items:
|
||||||
statuses:
|
statuses:
|
||||||
build_error: ошибка сборки
|
build_error: ошибка сборки
|
||||||
dependencies_fail: зависимости не найдены
|
dependencies_error: зависимости не найдены
|
||||||
success: собран
|
success: собран
|
||||||
unknown: ожидает сборки
|
unknown: ожидает сборки
|
||||||
|
|
||||||
statuses:
|
statuses:
|
||||||
build_error: ошибка сборки
|
build_error: ошибка сборки
|
||||||
|
build_published: опубликован
|
||||||
dependencies_fail: зависимости не найдены
|
dependencies_fail: зависимости не найдены
|
||||||
waiting_for_response: ожидает ответа
|
waiting_for_response: ожидает ответа
|
||||||
build_pending: ожидает сборку
|
build_pending: ожидает сборку
|
||||||
testing_faild: тестирование не пройдено
|
dependency_test_failed: тестирование зависимостей не пройдено
|
||||||
|
binary_test_failed: тестирование бинарной совместимости не пройдено
|
||||||
build_canceled: сборка отменена
|
build_canceled: сборка отменена
|
||||||
success: собран
|
success: собран
|
||||||
build_started: собирается
|
build_started: собирается
|
||||||
|
|
|
@ -9,9 +9,14 @@ class BuildServer
|
||||||
PLATFORM_PENDING = 2
|
PLATFORM_PENDING = 2
|
||||||
PROJECT_NOT_FOUND = 3
|
PROJECT_NOT_FOUND = 3
|
||||||
PROJECT_VERSION_NOT_FOUND = 4
|
PROJECT_VERSION_NOT_FOUND = 4
|
||||||
|
PROJECT_SOURCE_ERROR = 6
|
||||||
|
|
||||||
|
DEPENDENCY_TEST_FAILED = 21
|
||||||
|
BINARY_TEST_FAILED = 22
|
||||||
|
|
||||||
|
DEPENDENCIES_ERROR = 555
|
||||||
BUILD_ERROR = 666
|
BUILD_ERROR = 666
|
||||||
DEPENDENCIES_FAIL = 555
|
BUILD_STARTED = 3000
|
||||||
|
|
||||||
def self.client
|
def self.client
|
||||||
@@client ||= XMLRPC::Client.new3('host' => APP_CONFIG['build_server_ip'], 'port' => APP_CONFIG['build_server_port'], 'path' => APP_CONFIG['build_server_path'])
|
@@client ||= XMLRPC::Client.new3('host' => APP_CONFIG['build_server_ip'], 'port' => APP_CONFIG['build_server_port'], 'path' => APP_CONFIG['build_server_path'])
|
||||||
|
|
Loading…
Reference in New Issue