Home:ALL Converter>Which upstream project triggered a GitLab CI downstream pipeline

Which upstream project triggered a GitLab CI downstream pipeline

Ask Time:2022-03-10T16:11:07         Author:Marcel Stör

Json Formatter

I have a GitLab project pipeline that triggers a downstream pipeline, GitLab multi-project pipelines.

image: docker

trigger-docs:
  trigger:
    project: my-group/docs
    branch: feat/my-feature-branch

Is there a way for the triggered pipeline in my-group/docs to find out where it was triggered from? I checked the predefined CI variables but none seems to carry this information.

Could it be that my only option is to pass a dedicated variable from the upstream project as documented at https://docs.gitlab.com/ee/ci/pipelines/multi_project_pipelines.html#pass-cicd-variables-to-a-downstream-pipeline-by-using-the-variables-keyword?

Author:Marcel Stör,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/71420724/which-upstream-project-triggered-a-gitlab-ci-downstream-pipeline
yy