diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-02-19 17:49:12 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-02-28 09:26:09 +0900 |
commit | 6bbc380127d64dcb1dd755dd8082e619fe71bf4e (patch) | |
tree | a3bcde9fafffcde07c930bceeba356c4bc5c0f65 | |
parent | 716412d96230467054fcd3bbd68059759ca09cec (diff) | |
download | gitlab-ce-6bbc380127d64dcb1dd755dd8082e619fe71bf4e.tar.gz |
Add project level config for merge pipelines
Add schema
Add CE counter part
Add default value for
Add changelog
Fix schema
Add test
Fix schema
Fix schema version
Remove default value for
4 files changed, 18 insertions, 0 deletions
diff --git a/app/views/projects/_merge_request_merge_settings.html.haml b/app/views/projects/_merge_request_merge_settings.html.haml index f178c94e008..6ac2e06afa5 100644 --- a/app/views/projects/_merge_request_merge_settings.html.haml +++ b/app/views/projects/_merge_request_merge_settings.html.haml @@ -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 diff --git a/changelogs/unreleased/add-project-level-config-for-prospective-merge-pipelines-ce.yml b/changelogs/unreleased/add-project-level-config-for-prospective-merge-pipelines-ce.yml new file mode 100644 index 00000000000..39d7ead9af4 --- /dev/null +++ b/changelogs/unreleased/add-project-level-config-for-prospective-merge-pipelines-ce.yml @@ -0,0 +1,5 @@ +--- +title: Add project level config for merge pipelines +merge_request: 25385 +author: +type: added diff --git a/db/migrate/20190215154930_add_merge_pipelines_enabled_to_ci_cd_settings.rb b/db/migrate/20190215154930_add_merge_pipelines_enabled_to_ci_cd_settings.rb new file mode 100644 index 00000000000..2a2a216da7d --- /dev/null +++ b/db/migrate/20190215154930_add_merge_pipelines_enabled_to_ci_cd_settings.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index d4166e32112..7dfa9222278 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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 |