Create downstream pipeline inside same project
What does this MR do?
This is the first MR to support the creation of downstream pipeline inside the same project of the upstream pipeline.
In this MR we are changing Ci::CreateCrossProjectPipelineService
(will be renamed after this MR) to detect when to create a cross project pipeline or a child pipeline (same project). Given that we haven't added support to trigger a child pipeline from the YAML syntax yet, we are assuming that a runtime yaml snippet is saved in the bridge job options and will be used by the above mentioned service to create a child pipeline.
The end goal is to allow a trigger defined as follow, to create a child pipeline which can run concurrently with the parent or other child pipelines.
child-pipeline-1:
trigger:
include: path/to/child-pipeline-1.yml
child-pipeline-2:
trigger:
include:
- local: path/to/child-pipeline-2.yml
strategy: depend
In this MR we are assuming that the content of trigger:include
is saved in bridge.options
as
{
trigger: {
project: "groupname/projectname",
yaml: "---\ninclude: path/to/child-pipeline-1.yml\n"
}
}
If the upstream project is the same as downstream project AND a downstream YAML is defined, we create a child pipeline.
In subsequent MRs we add support for the YAML syntax, till then this feature won't be used. Documentation for this feature will be added at the end.
Related issue: #16094 (closed)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team