Commit d7b75b66 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'add-project-level-config-for-merge-train-ce' into 'master'

CE Backport: Add project level config for merge train

See merge request gitlab-org/gitlab-ce!27819
parents 0220e836 e5191254
# frozen_string_literal: true
class AddMergeTrainEnabledToCiCdSettings < ActiveRecord::Migration[5.1]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_column_with_default :project_ci_cd_settings, :merge_trains_enabled, :boolean, default: false, allow_null: false
end
def down
remove_column :project_ci_cd_settings, :merge_trains_enabled
end
end
...@@ -1612,6 +1612,7 @@ ActiveRecord::Schema.define(version: 20190426180107) do ...@@ -1612,6 +1612,7 @@ ActiveRecord::Schema.define(version: 20190426180107) do
t.integer "project_id", null: false t.integer "project_id", null: false
t.boolean "group_runners_enabled", default: true, null: false t.boolean "group_runners_enabled", default: true, null: false
t.boolean "merge_pipelines_enabled" t.boolean "merge_pipelines_enabled"
t.boolean "merge_trains_enabled", default: false, null: false
t.index ["project_id"], name: "index_project_ci_cd_settings_on_project_id", unique: true, using: :btree t.index ["project_id"], name: "index_project_ci_cd_settings_on_project_id", unique: true, using: :btree
end end
......
...@@ -2123,7 +2123,7 @@ describe MergeRequest do ...@@ -2123,7 +2123,7 @@ describe MergeRequest do
end end
context 'when merges are not restricted to green builds' do context 'when merges are not restricted to green builds' do
subject { build(:merge_request, target_project: build(:project, only_allow_merge_if_pipeline_succeeds: false)) } subject { build(:merge_request, target_project: create(:project, only_allow_merge_if_pipeline_succeeds: false)) }
context 'and a failed pipeline is associated' do context 'and a failed pipeline is associated' do
before do before do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment