Cross-project `triggered-by:` MVC
Description including problem, use cases, benefits, and/or goals
As a developer, I want not just to be able to trigger pipelines to start from a source job, but I want to mark a job as being triggered by another job. This will give me more flexibility in how I define the relationships between pipelines.
Proposal
@ayufan's has a proposal in https://gitlab.com/gitlab-org/gitlab-ce/issues/3743#note_5111288 for declaring dependencies. The summary example for Omnibus GitLab's .gitlab-ci.yml is:
triggered_by:
- repository: gitlab-org/gitlab-ce
on: master
- repository: gitlab-org/gitlab-ee
on: master
build_ce:
script:
- build-omnibus-ce $GITLAB_CE_TRIGGERED_SHA
build_ee:
script:
- build-omnibus-ee $GITLAB_EE_TRIGGERED_SHA
These triggers should work similarly to https://gitlab.com/gitlab-org/gitlab-ce/issues/52187 as far as how the token works (the current API expects you to have pre-generated tokens for the downstream project, but as a user, I'd like to be able to just specify the project name and let some other permission system allow the transaction.)