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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
99411fe5
Commit
99411fe5
authored
Sep 29, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check pipeline size limit when creating a pipeline
parent
fd724ace
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
app/services/ci/create_pipeline_service.rb
app/services/ci/create_pipeline_service.rb
+1
-0
spec/ee/spec/services/ci/create_pipeline_service_spec.rb
spec/ee/spec/services/ci/create_pipeline_service_spec.rb
+14
-0
No files found.
app/services/ci/create_pipeline_service.rb
View file @
99411fe5
...
@@ -6,6 +6,7 @@ module Ci
...
@@ -6,6 +6,7 @@ module Ci
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Validate
::
Repository
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Validate
::
Repository
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Validate
::
Config
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Validate
::
Config
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Skip
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Skip
,
EE
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Limit
::
Size
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Create
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Create
,
EE
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Limit
::
Activity
].
freeze
EE
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Limit
::
Activity
].
freeze
...
...
spec/ee/spec/services/ci/create_pipeline_service_spec.rb
View file @
99411fe5
...
@@ -43,11 +43,25 @@ describe Ci::CreatePipelineService, '#execute' do
...
@@ -43,11 +43,25 @@ describe Ci::CreatePipelineService, '#execute' do
# TODO, check failure reason
# TODO, check failure reason
expect
(
pipeline
).
to
be_persisted
expect
(
pipeline
).
to
be_persisted
expect
(
pipeline
).
to
be_failed
expect
(
pipeline
).
to
be_failed
expect
(
pipeline
.
statuses
).
not_to
be_empty
expect
(
pipeline
.
statuses
).
to
all
(
be_canceled
)
expect
(
pipeline
.
statuses
).
to
all
(
be_canceled
)
end
end
end
end
context
'when pipeline size limit is exceeded'
do
context
'when pipeline size limit is exceeded'
do
before
do
namespace
.
plan
.
update_column
(
:pipeline_size_limit
,
2
)
end
it
'drops pipeline without creating jobs'
do
pipeline
=
create_pipeline!
# TODO, check failure reason
expect
(
pipeline
).
to
be_persisted
expect
(
pipeline
).
to
be_failed
expect
(
pipeline
.
seeds_size
).
to
be
>
2
expect
(
pipeline
.
statuses
).
to
be_empty
end
end
end
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