diff --git a/app/models/mass_build.rb b/app/models/mass_build.rb index 6135c513a..8b563fc52 100644 --- a/app/models/mass_build.rb +++ b/app/models/mass_build.rb @@ -19,7 +19,7 @@ class MassBuild < ActiveRecord::Base 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, - :include_testing_subrepository + :include_testing_subrepository, :auto_create_container validates :save_to_platform_id, :build_for_platform_id, diff --git a/app/models/project.rb b/app/models/project.rb index c417344f6..b134f34cc 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -189,6 +189,7 @@ class Project < ActiveRecord::Base bl.project_version = project_version bl.user = user bl.auto_publish_status = mass_build.auto_publish_status + bl.auto_create_container = mass_build.auto_create_container bl.include_repos = include_repos bl.extra_repositories = mass_build.extra_repositories bl.extra_build_lists = mass_build.extra_build_lists diff --git a/app/views/platforms/mass_builds/new.html.haml b/app/views/platforms/mass_builds/new.html.haml index 929451275..d4be8ee51 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 include_testing_subrepository use_cached_chroot use_extra_tests).each do |field| + - %i(auto_create_container 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 a08cd156f..6b5f5bbcd 100644 --- a/app/views/platforms/mass_builds/show.html.haml +++ b/app/views/platforms/mass_builds/show.html.haml @@ -26,6 +26,10 @@ %td %b= t('activerecord.attributes.mass_build.auto_publish_status') %td= t("layout.build_lists.auto_publish_status.#{@mass_build.auto_publish_status}") + %tr + %td + %b= t('activerecord.attributes.mass_build.auto_create_container') + %td= t("layout.#{@mass_build.auto_create_container?}_") %tr %td %b= t('activerecord.attributes.mass_build.increase_release_tag') diff --git a/config/locales/models/mass_build.en.yml b/config/locales/models/mass_build.en.yml index 6281a5d0a..f7ad88208 100644 --- a/config/locales/models/mass_build.en.yml +++ b/config/locales/models/mass_build.en.yml @@ -32,6 +32,7 @@ en: arch_names: Architectures user: User auto_publish_status: Automated publishing + auto_create_container: Create container automatically increase_release_tag: Increase release tag use_cached_chroot: Use cached chroot use_extra_tests: Use extra tests diff --git a/config/locales/models/mass_build.ru.yml b/config/locales/models/mass_build.ru.yml index 442aa212c..33084f8cc 100644 --- a/config/locales/models/mass_build.ru.yml +++ b/config/locales/models/mass_build.ru.yml @@ -33,6 +33,7 @@ ru: arch_names: Архитектуры user: Пользователь auto_publish_status: Автоматическая публикация + auto_create_container: Создать контейнер автоматически increase_release_tag: Увеличить release тег use_cached_chroot: Использовать кэшированный chroot use_extra_tests: Использовать дополнительные тесты diff --git a/db/migrate/20140701172739_add_auto_create_container_to_mass_builds.rb b/db/migrate/20140701172739_add_auto_create_container_to_mass_builds.rb new file mode 100644 index 000000000..d109d7f88 --- /dev/null +++ b/db/migrate/20140701172739_add_auto_create_container_to_mass_builds.rb @@ -0,0 +1,5 @@ +class AddAutoCreateContainerToMassBuilds < ActiveRecord::Migration + def change + add_column :mass_builds, :auto_create_container, :boolean, default: false, null: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 1602b0bd7..6e02c3918 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: 20140630205045) do +ActiveRecord::Schema.define(version: 20140701172739) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -330,6 +330,7 @@ ActiveRecord::Schema.define(version: 20140630205045) do t.string "auto_publish_status", default: "none", null: false t.text "extra_mass_builds" t.boolean "include_testing_subrepository", default: false, null: false + t.boolean "auto_create_container", default: false, null: false end create_table "users", force: true do |t|