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
39a7103d
Commit
39a7103d
authored
Sep 28, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement pipeline activity and size limits
parent
599ba42d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
0 deletions
+66
-0
ee/lib/ee/gitlab/ci/pipeline/chain/limit/activity.rb
ee/lib/ee/gitlab/ci/pipeline/chain/limit/activity.rb
+33
-0
ee/lib/ee/gitlab/ci/pipeline/chain/limit/size.rb
ee/lib/ee/gitlab/ci/pipeline/chain/limit/size.rb
+33
-0
No files found.
ee/lib/ee/gitlab/ci/pipeline/chain/limit/activity.rb
0 → 100644
View file @
39a7103d
module
EE
module
Gitlab
module
Ci
module
Pipeline
module
Chain
class
Activity
<
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Base
include
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Helpers
def
initialize
(
*
)
super
@limit
=
Pipeline
::
Quota
::
Activity
.
new
(
project
.
namespace
,
pipeline
.
project
)
end
def
perform!
return
unless
@limit
.
exceeded?
return
unless
@command
.
save_incompleted
# TODO, add failure reason
# TODO, add validation error
@pipeline
.
drop
end
def
break?
@limit
.
exceeded?
end
end
end
end
end
end
end
ee/lib/ee/gitlab/ci/pipeline/chain/limit/size.rb
0 → 100644
View file @
39a7103d
module
EE
module
Gitlab
module
Ci
module
Pipeline
module
Chain
class
Size
<
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Base
include
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Helpers
def
initialize
(
*
)
super
@limit
=
Pipeline
::
Quota
::
Size
.
new
(
project
.
namespace
,
pipeline
)
end
def
perform!
return
unless
@limit
.
exceeded?
return
unless
@command
.
save_incompleted
# TODO, add failure reason
# TODO, add validation error
@pipeline
.
drop
end
def
break?
@limit
.
exceeded?
end
end
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