Multi-project pipeline trigger does not appear to trigger pipeline with a trigger like you would expect
Using a multi-project pipelines I am expecting to trigger a pipeline the same way I would with a trigger token, for example:
gstg-qa:
stage: gstg-qa
trigger:
project: gitlab-org/quality/staging
strategy: depend
Would trigger the this project the same way as :
curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master https://ops.gitlab.net/api/v4/projects/263/trigger/pipeline
What I see instead, is that the downstream jobs are not triggered jobs, but the jobs we have defined for initiating a pipeline normally:
The problem is that the documentation is unclear:
Interesting, it seem to react to
only: [:pipeline]which corresponds to dependent pipeline, instead of trigger.This to some extent does make sense (the
:pipeline) as this is external pipeline.This works for https://docs.gitlab.com/ee/ci/multi_project_pipelines.html#triggering-multi-project-pipelines-through-api.
It behaves exactly the same as:
curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master https://ops.gitlab.net/api/v4/projects/263/trigger/pipeline # it will have source :pipelineThis is also considered to be of source
:pipeline.:triggeris used bySettings > CI/CD > Pipeline Triggers.So, the problem is that our documentation is not very good on these regards, as it should clearly mention that you can filter by
CI_PIPELINE_SOURCE == :pipelineit means, that this pipeline is triggered by another pipeline (we know exactly the job that is triggering this pipeline).Consider, that this is different to:
curl --request POST --form "token=$PIPELINE_TRIGGERS_API_TOKEN" --form ref=master https://ops.gitlab.net/api/v4/projects/263/trigger/pipeline # it will have source :trigger
