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
e28b79bd
Commit
e28b79bd
authored
Jan 09, 2020
by
Fabio Pitino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert cross_project_pipeline source to pipeline
parent
20a46f3c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
6 deletions
+8
-6
app/models/ci/pipeline_enums.rb
app/models/ci/pipeline_enums.rb
+3
-1
app/services/ci/pipeline_trigger_service.rb
app/services/ci/pipeline_trigger_service.rb
+1
-1
changelogs/unreleased/create-downstream-pipeline-in-same-project.yml
...unreleased/create-downstream-pipeline-in-same-project.yml
+1
-1
ee/app/models/ee/ci/bridge.rb
ee/app/models/ee/ci/bridge.rb
+1
-1
ee/spec/requests/api/triggers_spec.rb
ee/spec/requests/api/triggers_spec.rb
+2
-2
No files found.
app/models/ci/pipeline_enums.rb
View file @
e28b79bd
...
...
@@ -23,7 +23,9 @@ module Ci
schedule:
4
,
api:
5
,
external:
6
,
cross_project_pipeline:
7
,
# TODO: Rename `pipeline` to `cross_project_pipeline` in 13.0
# https://gitlab.com/gitlab-org/gitlab/issues/195991
pipeline:
7
,
chat:
8
,
merge_request_event:
10
,
external_pull_request_event:
11
,
...
...
app/services/ci/pipeline_trigger_service.rb
View file @
e28b79bd
...
...
@@ -44,7 +44,7 @@ module Ci
return
error
(
"400 Job has to be running"
,
400
)
unless
job
.
running?
pipeline
=
Ci
::
CreatePipelineService
.
new
(
project
,
job
.
user
,
ref:
params
[
:ref
])
.
execute
(
:
cross_project_
pipeline
,
ignore_skip_ci:
true
)
do
|
pipeline
|
.
execute
(
:pipeline
,
ignore_skip_ci:
true
)
do
|
pipeline
|
source
=
job
.
sourced_pipelines
.
build
(
source_pipeline:
job
.
pipeline
,
source_project:
job
.
project
,
...
...
changelogs/unreleased/create-downstream-pipeline-in-same-project.yml
View file @
e28b79bd
---
title
:
Allow an upstream pipeline to create a downstream pipeline in the same project
merge_request
:
2
0930
merge_request
:
2
2663
author
:
type
:
added
ee/app/models/ee/ci/bridge.rb
View file @
e28b79bd
...
...
@@ -180,7 +180,7 @@ module EE
def
cross_project_params
{
project:
downstream_project
,
source: :
cross_project_
pipeline
,
source: :pipeline
,
target_revision:
{
ref:
target_ref
||
downstream_project
.
default_branch
},
...
...
ee/spec/requests/api/triggers_spec.rb
View file @
e28b79bd
...
...
@@ -60,7 +60,7 @@ describe API::Triggers do
expect
{
subject
}.
to
change
(
Ci
::
Pipeline
,
:count
)
expect
(
response
).
to
have_http_status
(
201
)
expect
(
Ci
::
Pipeline
.
last
.
source
).
to
eq
(
'
cross_project_
pipeline'
)
expect
(
Ci
::
Pipeline
.
last
.
source
).
to
eq
(
'pipeline'
)
expect
(
Ci
::
Pipeline
.
last
.
triggered_by_pipeline
).
not_to
be_nil
expect
(
Ci
::
Sources
::
Pipeline
.
last
).
to
have_attributes
(
pipeline_id:
(
a_value
>
0
),
...
...
@@ -94,7 +94,7 @@ describe API::Triggers do
.
and
change
(
Ci
::
PipelineVariable
,
:count
)
expect
(
response
).
to
have_http_status
(
201
)
expect
(
Ci
::
Pipeline
.
last
.
source
).
to
eq
(
'
cross_project_
pipeline'
)
expect
(
Ci
::
Pipeline
.
last
.
source
).
to
eq
(
'pipeline'
)
expect
(
Ci
::
Pipeline
.
last
.
triggered_by_pipeline
).
not_to
be_nil
expect
(
Ci
::
Pipeline
.
last
.
variables
.
map
{
|
v
|
{
v
.
key
=>
v
.
value
}
}.
last
).
to
eq
(
params
[
:variables
])
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