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
73388007
Commit
73388007
authored
Sep 13, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PipelineTriggerService to associate trigger_request with builds
parent
373ff978
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/services/ci/pipeline_trigger_service.rb
app/services/ci/pipeline_trigger_service.rb
+1
-1
spec/services/ci/pipeline_trigger_service_spec.rb
spec/services/ci/pipeline_trigger_service_spec.rb
+2
-0
No files found.
app/services/ci/pipeline_trigger_service.rb
View file @
73388007
...
@@ -14,7 +14,7 @@ module Ci
...
@@ -14,7 +14,7 @@ module Ci
pipeline
=
Ci
::
CreatePipelineService
.
new
(
project
,
trigger
.
owner
,
ref:
params
[
:ref
])
pipeline
=
Ci
::
CreatePipelineService
.
new
(
project
,
trigger
.
owner
,
ref:
params
[
:ref
])
.
execute
(
:trigger
,
ignore_skip_ci:
true
)
do
|
pipeline
|
.
execute
(
:trigger
,
ignore_skip_ci:
true
)
do
|
pipeline
|
trigger
.
trigger_requests
.
create!
(
pipeline:
pipeline
)
pipeline
.
trigger_requests
.
create!
(
trigger:
trigger
)
create_pipeline_variables!
(
pipeline
)
create_pipeline_variables!
(
pipeline
)
end
end
...
...
spec/services/ci/pipeline_trigger_service_spec.rb
View file @
73388007
...
@@ -34,6 +34,8 @@ describe Ci::PipelineTriggerService do
...
@@ -34,6 +34,8 @@ describe Ci::PipelineTriggerService do
expect
(
result
[
:pipeline
].
ref
).
to
eq
(
'master'
)
expect
(
result
[
:pipeline
].
ref
).
to
eq
(
'master'
)
expect
(
result
[
:pipeline
].
project
).
to
eq
(
project
)
expect
(
result
[
:pipeline
].
project
).
to
eq
(
project
)
expect
(
result
[
:pipeline
].
user
).
to
eq
(
trigger
.
owner
)
expect
(
result
[
:pipeline
].
user
).
to
eq
(
trigger
.
owner
)
expect
([
result
[
:pipeline
].
trigger_requests
.
last
])
.
to
eq
(
result
[
:pipeline
].
builds
.
map
(
&
:trigger_request
).
uniq
)
expect
(
result
[
:status
]).
to
eq
(
:success
)
expect
(
result
[
:status
]).
to
eq
(
:success
)
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