Docs feedback: Wrong variable used in rules:if in the "Run child pipelines with merge request pipelines" section from "Downstream pipelines"
Problem to solve
The following section of the docs uses a variable wrongly: https://docs.gitlab.com/ee/ci/pipelines/downstream_pipelines.html#run-child-pipelines-with-merge-request-pipelines.
As per this comment (and verified on the docs) $CI_PIPELINE_SOURCE
has the value parent_pipeline
and thus can't be used to run MR children pipelines. A successful solution was to check for the presence of the variable $CI_MERGE_REQUEST_ID
.
Further details
Proposal
The docs should be updated to include a working example, using $CI_MERGE_REQUEST_ID
instead of $CI_PIPELINE_SOURCE
.
Who can address the issue
Other links/references
Link to the docs: https://docs.gitlab.com/ee/ci/pipelines/downstream_pipelines.html#run-child-pipelines-with-merge-request-pipelines