New predefined variable: CI_UPSTREAM_PROJECT_ID

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Issue

There is currently no way in a multi project pipeline to retrieve the upstream project. The only way to do this in general right now seems to be the GraphQL api which isn't accessible using the CI_JOB_TOKEN.

Knowing which upstream project triggered a CI run is valuable for allowing/disallowing certain actions.

Proposal

Add a new predefined variable CI_UPSTREAM_PROJECT_ID which will be available in any downstream pipeline that will contain the triggered pipeline id

Edited by 🤖 GitLab Bot 🤖