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
d16bb447
Commit
d16bb447
authored
Mar 21, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start building abstraction over pipeline seeds
parent
b24b45be
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
5 deletions
+26
-5
base.rb
lib/gitlab/ci/pipeline/seed/base.rb
+17
-0
stage.rb
lib/gitlab/ci/pipeline/seed/stage.rb
+4
-2
yaml_processor.rb
lib/gitlab/ci/yaml_processor.rb
+2
-1
stage_spec.rb
spec/lib/gitlab/ci/pipeline/seed/stage_spec.rb
+1
-1
pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+2
-1
No files found.
lib/gitlab/ci/pipeline/seed/base.rb
0 → 100644
View file @
d16bb447
module
Gitlab
module
Ci
module
Pipeline
module
Seed
class
Base
def
attributes
raise
NotImplementedError
end
def
excluded?
raise
NotImplementedError
end
end
end
end
end
end
lib/gitlab/ci/
stage/seed
.rb
→
lib/gitlab/ci/
pipeline/seed/stage
.rb
View file @
d16bb447
module
Gitlab
module
Ci
module
Stage
class
Seed
module
Pipeline
module
Seed
class
Stage
<
Seed
::
Base
include
::
Gitlab
::
Utils
::
StrongMemoize
attr_reader
:pipeline
...
...
@@ -63,4 +64,5 @@ module Gitlab
end
end
end
end
end
lib/gitlab/ci/yaml_processor.rb
View file @
d16bb447
...
...
@@ -73,7 +73,8 @@ module Gitlab
seeds
=
@stages
.
uniq
.
map
do
|
stage
|
builds
=
pipeline_stage_builds
(
stage
,
pipeline
)
Gitlab
::
Ci
::
Stage
::
Seed
.
new
(
pipeline
,
stage
,
builds
)
if
builds
.
any?
Gitlab
::
Ci
::
Pipeline
::
Seed
::
Stage
.
new
(
pipeline
,
stage
,
builds
)
if
builds
.
any?
end
seeds
.
compact
...
...
spec/lib/gitlab/ci/
stage/seed
_spec.rb
→
spec/lib/gitlab/ci/
pipeline/seed/stage
_spec.rb
View file @
d16bb447
require
'spec_helper'
describe
Gitlab
::
Ci
::
Stage
::
Seed
do
describe
Gitlab
::
Ci
::
Pipeline
::
Seed
::
Stage
do
let
(
:pipeline
)
{
create
(
:ci_empty_pipeline
)
}
let
(
:builds
)
do
...
...
spec/models/ci/pipeline_spec.rb
View file @
d16bb447
...
...
@@ -247,7 +247,8 @@ describe Ci::Pipeline, :mailer do
end
it
'returns preseeded stage seeds object'
do
expect
(
pipeline
.
stage_seeds
).
to
all
(
be_a
Gitlab
::
Ci
::
Stage
::
Seed
)
expect
(
pipeline
.
stage_seeds
)
.
to
all
(
be_a
Gitlab
::
Ci
::
Pipeline
::
Seed
::
Base
)
expect
(
pipeline
.
stage_seeds
.
count
).
to
eq
1
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