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
0ba6841b
Commit
0ba6841b
authored
Mar 22, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring seeds size method back to CI/CD pipeline class
parent
224509ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+4
-0
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+17
-0
No files found.
app/models/ci/pipeline.rb
View file @
0ba6841b
...
...
@@ -385,6 +385,10 @@ module Ci
end
end
def
seeds_size
stage_seeds
.
sum
(
&
:size
)
end
def
has_kubernetes_active?
project
.
deployment_platform
&
.
active?
end
...
...
spec/models/ci/pipeline_spec.rb
View file @
0ba6841b
...
...
@@ -335,6 +335,23 @@ describe Ci::Pipeline, :mailer do
end
end
describe
'#seeds_size'
do
context
'when refs policy is specified'
do
let
(
:config
)
do
{
production:
{
stage:
'deploy'
,
script:
'cap prod'
,
only:
[
'master'
]
},
spinach:
{
stage:
'test'
,
script:
'spinach'
,
only:
[
'tags'
]
}
}
end
let
(
:pipeline
)
do
build
(
:ci_pipeline
,
ref:
'feature'
,
tag:
true
,
config:
config
)
end
it
'returns real seeds size'
do
expect
(
pipeline
.
seeds_size
).
to
eq
1
end
end
end
describe
'legacy stages'
do
before
do
create
(
:commit_status
,
pipeline:
pipeline
,
...
...
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