Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
e5191254
Commit
e5191254
authored
Apr 16, 2019
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add project level config for merge train
We add the option and expose the parameter for frontend work
parent
a96e96d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
db/migrate/20190416185130_add_merge_train_enabled_to_ci_cd_settings.rb
...190416185130_add_merge_train_enabled_to_ci_cd_settings.rb
+17
-0
db/schema.rb
db/schema.rb
+1
-0
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+1
-1
No files found.
db/migrate/20190416185130_add_merge_train_enabled_to_ci_cd_settings.rb
0 → 100644
View file @
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
db/schema.rb
View file @
e5191254
...
@@ -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
...
...
spec/models/merge_request_spec.rb
View file @
e5191254
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment