Passing dynamic variables down multi-project pipelines?

I’m trying to build a multi-project CI/CD pipeline.

I like the syntax of triggering downstream jobs in .gitlab-ci.yml:

  stage: downstream
    project: acme/deployment

But, how would I inject a dynamic variable into acme/deployment job? I want to read version number from the build, and then pass it down.

As it is a bridge job I can’t use script, so I can’t read it within the same job. I thought maybe a global

  - export APP_VERSION=$(cat versions/$APP_NAME.txt)

But that does not work (which makes sense to me, since it not executed on a runner).

But now I am out of ideas. How would I inject dynamic content into the bridge job? Is it possible at all ? Or do I need to consider other solutions? Suggestions?

Had the same issue, unfortunately there isn’t a obvious solution so far. The good news is, that this is a known issue and tracked as a bug to be fixed with GitLab 13.5:

Hope that helps. Also consider giving the issue a thumbs up. :grin:

Unfortunatly it has been closed.