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
933f2cb3
Commit
933f2cb3
authored
Mar 27, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve CE/EE conflicts related to pipeline seeds
parent
b0191139
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
81 deletions
+0
-81
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+0
-3
app/services/ci/create_pipeline_service.rb
app/services/ci/create_pipeline_service.rb
+0
-5
app/services/ci/pipeline_trigger_service.rb
app/services/ci/pipeline_trigger_service.rb
+0
-6
spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb
spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb
+0
-8
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+0
-59
No files found.
app/models/ci/pipeline.rb
View file @
933f2cb3
...
...
@@ -7,11 +7,8 @@ module Ci
include
Presentable
include
Gitlab
::
OptimisticLocking
include
Gitlab
::
Utils
::
StrongMemoize
<<<<<<<
HEAD
prepend
::
EE
::
Ci
::
Pipeline
=======
>>>>>>>
upstream
/
master
belongs_to
:project
,
inverse_of: :pipelines
belongs_to
:user
...
...
app/services/ci/create_pipeline_service.rb
View file @
933f2cb3
...
...
@@ -8,15 +8,10 @@ module Ci
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Validate
::
Repository
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Validate
::
Config
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Skip
,
<<<<<<<
HEAD
EE
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Limit
::
Size
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Populate
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Create
,
EE
::
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Limit
::
Activity
].
freeze
=======
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Populate
,
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Create
].
freeze
>>>>>>>
upstream
/
master
def
execute
(
source
,
ignore_skip_ci:
false
,
save_on_errors:
true
,
trigger_request:
nil
,
schedule:
nil
,
mirror_update:
false
,
&
block
)
@pipeline
=
Ci
::
Pipeline
.
new
...
...
app/services/ci/pipeline_trigger_service.rb
View file @
933f2cb3
...
...
@@ -20,7 +20,6 @@ module Ci
.
execute
(
:trigger
,
ignore_skip_ci:
true
)
do
|
pipeline
|
pipeline
.
trigger_requests
.
build
(
trigger:
trigger
)
pipeline
.
variables
.
build
(
variables
)
<<<<<<<
HEAD
end
if
pipeline
.
persisted?
...
...
@@ -46,8 +45,6 @@ module Ci
pipeline
.
source_pipeline
=
source
pipeline
.
variables
.
build
(
variables
)
=======
>>>>>>>
upstream
/
master
end
if
pipeline
.
persisted?
...
...
@@ -63,15 +60,12 @@ module Ci
end
end
<<<<<<<
HEAD
def
job_from_token
strong_memoize
(
:job
)
do
Ci
::
Build
.
find_by_token
(
params
[
:token
].
to_s
)
end
end
=======
>>>>>>>
upstream
/
master
def
variables
params
[
:variables
].
to_h
.
map
do
|
key
,
value
|
{
key:
key
,
value:
value
}
...
...
spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb
View file @
933f2cb3
require
'spec_helper'
describe
Gitlab
::
Ci
::
Pipeline
::
Chain
::
Populate
do
<<<<<<<
HEAD
set
(
:project
)
{
create
(
:project
,
:repository
)
}
=======
set
(
:project
)
{
create
(
:project
)
}
>>>>>>>
upstream
/
master
set
(
:user
)
{
create
(
:user
)
}
let
(
:pipeline
)
do
...
...
@@ -143,11 +139,7 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
end
let
(
:pipeline
)
do
<<<<<<<
HEAD
build
(
:ci_pipeline
,
ref:
'master'
,
project:
project
,
config:
config
)
=======
build
(
:ci_pipeline
,
ref:
'master'
,
config:
config
)
>>>>>>>
upstream
/
master
end
it
'populates pipeline according to used policies'
do
...
...
spec/models/ci/pipeline_spec.rb
View file @
933f2cb3
...
...
@@ -238,12 +238,8 @@ describe Ci::Pipeline, :mailer do
describe
'pipeline stages'
do
describe
'#stage_seeds'
do
<<<<<<<
HEAD
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
{
build
(
:ci_pipeline
,
project:
project
,
config:
config
)
}
=======
let
(
:pipeline
)
{
build
(
:ci_pipeline
,
config:
config
)
}
>>>>>>>
upstream
/
master
let
(
:config
)
{
{
rspec:
{
script:
'rake'
}
}
}
it
'returns preseeded stage seeds object'
do
...
...
@@ -258,17 +254,10 @@ describe Ci::Pipeline, :mailer do
rspec:
{
stage:
'test'
,
script:
'rspec'
},
spinach:
{
stage:
'test'
,
script:
'spinach'
}
}
end
<<<<<<<
HEAD
it
'correctly fabricates a stage seeds object'
do
seeds
=
pipeline
.
stage_seeds
=======
it
'correctly fabricates a stage seeds object'
do
seeds
=
pipeline
.
stage_seeds
>>>>>>>
upstream
/
master
expect
(
seeds
.
size
).
to
eq
2
expect
(
seeds
.
first
.
attributes
[
:name
]).
to
eq
'test'
expect
(
seeds
.
second
.
attributes
[
:name
]).
to
eq
'deploy'
...
...
@@ -280,11 +269,7 @@ describe Ci::Pipeline, :mailer do
context
'when refs policy is specified'
do
let
(
:pipeline
)
do
<<<<<<<
HEAD
build
(
:ci_pipeline
,
ref:
'feature'
,
tag:
true
,
project:
project
,
config:
config
)
=======
build
(
:ci_pipeline
,
ref:
'feature'
,
tag:
true
,
config:
config
)
>>>>>>>
upstream
/
master
end
let
(
:config
)
do
...
...
@@ -302,17 +287,10 @@ describe Ci::Pipeline, :mailer do
end
context
'when source policy is specified'
do
<<<<<<<
HEAD
let
(
:pipeline
)
do
build
(
:ci_pipeline
,
source: :schedule
,
project:
project
,
config:
config
)
end
let
(
:config
)
do
{
production:
{
stage:
'deploy'
,
script:
'cap prod'
,
only:
[
'triggers'
]
},
spinach:
{
stage:
'test'
,
script:
'spinach'
,
only:
[
'schedules'
]
}
}
=======
let
(
:pipeline
)
{
build
(
:ci_pipeline
,
source: :schedule
,
config:
config
)
}
let
(
:config
)
do
{
production:
{
stage:
'deploy'
,
script:
'cap prod'
,
only:
[
'triggers'
]
},
spinach:
{
stage:
'test'
,
script:
'spinach'
,
only:
[
'schedules'
]
}
}
...
...
@@ -324,22 +302,9 @@ describe Ci::Pipeline, :mailer do
expect
(
seeds
.
size
).
to
eq
1
expect
(
seeds
.
first
.
attributes
[
:name
]).
to
eq
'test'
expect
(
seeds
.
dig
(
0
,
0
,
:name
)).
to
eq
'spinach'
>>>>>>>
upstream
/
master
end
end
<<<<<<<
HEAD
it
'returns stage seeds only assigned to schedules'
do
seeds
=
pipeline
.
stage_seeds
expect
(
seeds
.
size
).
to
eq
1
expect
(
seeds
.
first
.
attributes
[
:name
]).
to
eq
'test'
expect
(
seeds
.
dig
(
0
,
0
,
:name
)).
to
eq
'spinach'
end
end
=======
>>>>>>>
upstream
/
master
context
'when kubernetes policy is specified'
do
let
(
:config
)
do
{
...
...
@@ -351,21 +316,12 @@ describe Ci::Pipeline, :mailer do
}
}
end
<<<<<<<
HEAD
context
'when kubernetes is active'
do
shared_examples
'same behavior between KubernetesService and Platform::Kubernetes'
do
it
'returns seeds for kubernetes dependent job'
do
seeds
=
pipeline
.
stage_seeds
=======
context
'when kubernetes is active'
do
shared_examples
'same behavior between KubernetesService and Platform::Kubernetes'
do
it
'returns seeds for kubernetes dependent job'
do
seeds
=
pipeline
.
stage_seeds
>>>>>>>
upstream
/
master
expect
(
seeds
.
size
).
to
eq
2
expect
(
seeds
.
dig
(
0
,
0
,
:name
)).
to
eq
'spinach'
expect
(
seeds
.
dig
(
1
,
0
,
:name
)).
to
eq
'production'
...
...
@@ -373,11 +329,7 @@ describe Ci::Pipeline, :mailer do
end
context
'when user configured kubernetes from Integration > Kubernetes'
do
<<<<<<<
HEAD
let
(
:project
)
{
create
(
:kubernetes_project
,
:repository
)
}
=======
let
(
:project
)
{
create
(
:kubernetes_project
)
}
>>>>>>>
upstream
/
master
let
(
:pipeline
)
{
build
(
:ci_pipeline
,
project:
project
,
config:
config
)
}
it_behaves_like
'same behavior between KubernetesService and Platform::Kubernetes'
...
...
@@ -405,28 +357,17 @@ describe Ci::Pipeline, :mailer do
describe
'#seeds_size'
do
context
'when refs policy is specified'
do
<<<<<<<
HEAD
let
(
:project
)
{
create
(
:project
,
:repository
)
}
=======
>>>>>>>
upstream
/
master
let
(
:config
)
do
{
production:
{
stage:
'deploy'
,
script:
'cap prod'
,
only:
[
'master'
]
},
spinach:
{
stage:
'test'
,
script:
'spinach'
,
only:
[
'tags'
]
}
}
end
<<<<<<<
HEAD
let
(
:pipeline
)
do
build
(
:ci_pipeline
,
ref:
'feature'
,
tag:
true
,
project:
project
,
config:
config
)
end
=======
let
(
:pipeline
)
do
build
(
:ci_pipeline
,
ref:
'feature'
,
tag:
true
,
config:
config
)
end
>>>>>>>
upstream
/
master
it
'returns real seeds size'
do
expect
(
pipeline
.
seeds_size
).
to
eq
1
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