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

Backport: Add project level config for merge pipelines

See merge request gitlab-org/gitlab-ce!25385
This commit is contained in:
Filipa Lacerda 2019-02-28 10:01:09 +00:00
commit 62e1520761
4 changed files with 18 additions and 0 deletions

View file

@ -9,6 +9,7 @@
%span.descr
Pipelines need to be configured to enable this feature.
= link_to icon('question-circle'), help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds'), target: '_blank'
= render_if_exists 'projects/merge_pipelines_settings', form: form
.form-check
= form.check_box :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-input'
= form.label :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-label' do

View file

@ -0,0 +1,5 @@
---
title: Add project level config for merge pipelines
merge_request: 25385
author:
type: added

View file

@ -0,0 +1,11 @@
# frozen_string_literal: true
class AddMergePipelinesEnabledToCiCdSettings < ActiveRecord::Migration[5.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def change
add_column :project_ci_cd_settings, :merge_pipelines_enabled, :boolean
end
end

View file

@ -1575,6 +1575,7 @@ ActiveRecord::Schema.define(version: 20190220150130) do
create_table "project_ci_cd_settings", force: :cascade do |t|
t.integer "project_id", null: false
t.boolean "group_runners_enabled", default: true, null: false
t.boolean "merge_pipelines_enabled"
t.index ["project_id"], name: "index_project_ci_cd_settings_on_project_id", unique: true, using: :btree
end