BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d6ba5530
Commit
d6ba5530
authored
May 15, 2017
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'enable-auto-cancelling-by-default' into 'master'
Make auto-cancelling pending pipelines on by default Closes #30656 See merge request !11023
parents
743cde02
20ece0aa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
3 deletions
+38
-3
enable-auto-cancelling-by-default.yml
changelogs/unreleased/enable-auto-cancelling-by-default.yml
+4
-0
20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb
...65653_make_auto_cancel_pending_pipelines_on_by_default.rb
+13
-0
20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
...502070007_enable_auto_cancel_pending_pipelines_for_all.rb
+15
-0
schema.rb
db/schema.rb
+1
-1
post_receive_spec.rb
spec/workers/post_receive_spec.rb
+5
-2
No files found.
changelogs/unreleased/enable-auto-cancelling-by-default.yml
0 → 100644
View file @
d6ba5530
---
title
:
Enable cancelling non-HEAD pending pipelines by default for all projects
merge_request
:
11023
author
:
db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb
0 → 100644
View file @
d6ba5530
class
MakeAutoCancelPendingPipelinesOnByDefault
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
up
change_column_default
(
:projects
,
:auto_cancel_pending_pipelines
,
1
)
end
def
down
change_column_default
(
:projects
,
:auto_cancel_pending_pipelines
,
0
)
end
end
db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
0 → 100644
View file @
d6ba5530
class
EnableAutoCancelPendingPipelinesForAll
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
DOWNTIME
=
false
def
up
update_column_in_batches
(
:projects
,
:auto_cancel_pending_pipelines
,
1
)
end
def
down
# Nothing we can do!
end
end
db/schema.rb
View file @
d6ba5530
...
...
@@ -988,7 +988,7 @@ ActiveRecord::Schema.define(version: 20170508190732) do
t
.
text
"description_html"
t
.
boolean
"only_allow_merge_if_all_discussions_are_resolved"
t
.
boolean
"printing_merge_request_link_enabled"
,
default:
true
,
null:
false
t
.
integer
"auto_cancel_pending_pipelines"
,
default:
0
,
null:
false
t
.
integer
"auto_cancel_pending_pipelines"
,
default:
1
,
null:
false
t
.
string
"import_jid"
t
.
integer
"cached_markdown_version"
t
.
datetime
"last_repository_updated_at"
...
...
spec/workers/post_receive_spec.rb
View file @
d6ba5530
...
...
@@ -4,13 +4,16 @@ describe PostReceive do
let
(
:changes
)
{
"123456 789012 refs/heads/tést
\n
654321 210987 refs/tags/tag"
}
let
(
:wrongly_encoded_changes
)
{
changes
.
encode
(
"ISO-8859-1"
).
force_encoding
(
"UTF-8"
)
}
let
(
:base64_changes
)
{
Base64
.
encode64
(
wrongly_encoded_changes
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project_identifier
)
{
"project-
#{
project
.
id
}
"
}
let
(
:key
)
{
create
(
:key
,
user:
project
.
owner
)
}
let
(
:key_id
)
{
key
.
shell_id
}
let
(
:project
)
do
create
(
:project
,
:repository
,
auto_cancel_pending_pipelines:
'disabled'
)
end
context
"as a sidekiq worker"
do
it
"reponds to #perform"
do
it
"re
s
ponds to #perform"
do
expect
(
described_class
.
new
).
to
respond_to
(
:perform
)
end
end
...
...
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