diff --git a/app/models/mass_build.rb b/app/models/mass_build.rb index 6ec1bd378..6135c513a 100644 --- a/app/models/mass_build.rb +++ b/app/models/mass_build.rb @@ -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, diff --git a/app/models/project.rb b/app/models/project.rb index a89636ef5..c417344f6 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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 diff --git a/app/views/platforms/mass_builds/new.html.haml b/app/views/platforms/mass_builds/new.html.haml index e82b1f571..929451275 100644 --- a/app/views/platforms/mass_builds/new.html.haml +++ b/app/views/platforms/mass_builds/new.html.haml @@ -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 diff --git a/app/views/platforms/mass_builds/show.html.haml b/app/views/platforms/mass_builds/show.html.haml index b0038a13d..a08cd156f 100644 --- a/app/views/platforms/mass_builds/show.html.haml +++ b/app/views/platforms/mass_builds/show.html.haml @@ -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') diff --git a/config/locales/models/mass_build.en.yml b/config/locales/models/mass_build.en.yml index e1624d218..6281a5d0a 100644 --- a/config/locales/models/mass_build.en.yml +++ b/config/locales/models/mass_build.en.yml @@ -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 diff --git a/config/locales/models/mass_build.ru.yml b/config/locales/models/mass_build.ru.yml index b7fc7907f..442aa212c 100644 --- a/config/locales/models/mass_build.ru.yml +++ b/config/locales/models/mass_build.ru.yml @@ -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: Собрано для платформы diff --git a/db/migrate/20140630205045_add_include_testing_subrepository_to_mass_builds.rb b/db/migrate/20140630205045_add_include_testing_subrepository_to_mass_builds.rb new file mode 100644 index 000000000..9721ca0a0 --- /dev/null +++ b/db/migrate/20140630205045_add_include_testing_subrepository_to_mass_builds.rb @@ -0,0 +1,5 @@ +class AddIncludeTestingSubrepositoryToMassBuilds < ActiveRecord::Migration + def change + add_column :mass_builds, :include_testing_subrepository, :boolean, null: false, default: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 9bf968bd9..1602b0bd7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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|