#405: added include_testing_subrepository to MassBuild

This commit is contained in:
Vokhmin Alexey V 2014-07-01 00:56:13 +04:00
parent bb1e11e256
commit 075f997f6d
8 changed files with 44 additions and 30 deletions

View File

@ -18,7 +18,8 @@ class MassBuild < ActiveRecord::Base
attr_accessor :arches
attr_accessible :arches, :auto_publish_status, :projects_list, :build_for_platform_id,
:extra_repositories, :extra_build_lists, :increase_release_tag,
:use_cached_chroot, :use_extra_tests, :description, :extra_mass_builds
:use_cached_chroot, :use_extra_tests, :description, :extra_mass_builds,
:include_testing_subrepository
validates :save_to_platform_id,
:build_for_platform_id,

View File

@ -182,21 +182,22 @@ class Project < ActiveRecord::Base
increase_release_tag(project_version, user, "MassBuild##{mass_build.id}: Increase release tag") if increase_rt
build_list = build_lists.build do |bl|
bl.save_to_platform = save_to_platform
bl.build_for_platform = build_for_platform
bl.update_type = 'newpackage'
bl.arch = arch
bl.project_version = project_version
bl.user = user
bl.auto_publish_status = mass_build.auto_publish_status
bl.include_repos = include_repos
bl.extra_repositories = mass_build.extra_repositories
bl.extra_build_lists = mass_build.extra_build_lists
bl.priority = priority
bl.mass_build_id = mass_build.id
bl.save_to_repository_id = repository_id
bl.use_cached_chroot = mass_build.use_cached_chroot?
bl.use_extra_tests = mass_build.use_extra_tests?
bl.save_to_platform = save_to_platform
bl.build_for_platform = build_for_platform
bl.update_type = 'newpackage'
bl.arch = arch
bl.project_version = project_version
bl.user = user
bl.auto_publish_status = mass_build.auto_publish_status
bl.include_repos = include_repos
bl.extra_repositories = mass_build.extra_repositories
bl.extra_build_lists = mass_build.extra_build_lists
bl.priority = priority
bl.mass_build_id = mass_build.id
bl.save_to_repository_id = repository_id
bl.include_testing_subrepository = mass_build.include_testing_subrepository?
bl.use_cached_chroot = mass_build.use_cached_chroot?
bl.use_extra_tests = mass_build.use_extra_tests?
end
build_list.save
end

View File

@ -52,7 +52,7 @@
.both
= f.select :auto_publish_status, auto_publish_statuses
= f.label :auto_publish_status
- %i(increase_release_tag use_cached_chroot use_extra_tests).each do |field|
- %i(increase_release_tag include_testing_subrepository use_cached_chroot use_extra_tests).each do |field|
.both
= f.check_box field
= f.label field

View File

@ -30,6 +30,10 @@
%td
%b= t('activerecord.attributes.mass_build.increase_release_tag')
%td= t("layout.#{@mass_build.increase_release_tag?}_")
%tr
%td
%b= t('activerecord.attributes.mass_build.include_testing_subrepository')
%td= t("layout.#{@mass_build.include_testing_subrepository?}_")
%tr
%td
%b= t('activerecord.attributes.mass_build.use_cached_chroot')

View File

@ -35,6 +35,7 @@ en:
increase_release_tag: Increase release tag
use_cached_chroot: Use cached chroot
use_extra_tests: Use extra tests
include_testing_subrepository: "Include 'testing' subrepository"
repositories: Repositories
projects_list: Projects list
build_for_platform: Build for platform

View File

@ -36,6 +36,7 @@ ru:
increase_release_tag: Увеличить release тег
use_cached_chroot: Использовать кэшированный chroot
use_extra_tests: Использовать дополнительные тесты
include_testing_subrepository: "Подключить 'testing' подрепозиторий"
repositories: Репозитории
projects_list: Список проектов
build_for_platform: Собрано для платформы

View File

@ -0,0 +1,5 @@
class AddIncludeTestingSubrepositoryToMassBuilds < ActiveRecord::Migration
def change
add_column :mass_builds, :include_testing_subrepository, :boolean, null: false, default: false
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140627173727) do
ActiveRecord::Schema.define(version: 20140630205045) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -308,27 +308,28 @@ ActiveRecord::Schema.define(version: 20140627173727) do
end
create_table "mass_builds", force: true do |t|
t.integer "build_for_platform_id", null: false
t.integer "build_for_platform_id", null: false
t.string "name"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "arch_names"
t.integer "user_id"
t.integer "build_lists_count", default: 0, null: false
t.boolean "stop_build", default: false, null: false
t.integer "build_lists_count", default: 0, null: false
t.boolean "stop_build", default: false, null: false
t.text "projects_list"
t.integer "missed_projects_count", default: 0, null: false
t.integer "missed_projects_count", default: 0, null: false
t.text "missed_projects_list"
t.boolean "new_core", default: true
t.integer "save_to_platform_id", null: false
t.boolean "new_core", default: true
t.integer "save_to_platform_id", null: false
t.text "extra_repositories"
t.text "extra_build_lists"
t.boolean "increase_release_tag", default: false, null: false
t.boolean "use_cached_chroot", default: true, null: false
t.boolean "use_extra_tests", default: false, null: false
t.boolean "increase_release_tag", default: false, null: false
t.boolean "use_cached_chroot", default: true, null: false
t.boolean "use_extra_tests", default: false, null: false
t.string "description"
t.string "auto_publish_status", default: "none", null: false
t.string "auto_publish_status", default: "none", null: false
t.text "extra_mass_builds"
t.boolean "include_testing_subrepository", default: false, null: false
end
create_table "users", force: true do |t|