Commit e28b79bd authored by Fabio Pitino's avatar Fabio Pitino

Revert cross_project_pipeline source to pipeline

parent 20a46f3c
......@@ -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,
......
......@@ -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,
......
---
title: Allow an upstream pipeline to create a downstream pipeline in the same project
merge_request: 20930
merge_request: 22663
author:
type: added
......@@ -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
},
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment