Passing variables to downstream pipeline not behaving as described/intended
Summary
As explained in the gitlab docs, variables expressed in an upstream project pipeline should be expanded, and then passed to downstream pipeline.
Steps to reproduce
"upstream-proj"
.gitlab-ci.yml .
my-pipeline:
stage: Deploy
variables:
UPSTREAM_PROJECT: $CI_PROJECT_NAME
trigger:
project: downstream-proj
"downstream-proj"
.gitlab-ci.yml
update manifest:
stage: test
image: busybox
script:
- echo $UPSTREAM_PROJECT
Example Project
What is the current bug behavior?
(What actually happens)
The downstream project logs:
echo $UPSTREAM_PROJECT
downstream_proj
What is the expected correct behavior?
(What you should see instead)
The downstream project logs:
echo $UPSTREAM_PROJECT
upstream_proj
Screenshot from the gitlab docs:
Relevant logs and/or screenshots
logs of infra project (the name of my downstream project):
$ echo $UPSTREAM_PROJECT
infra
when it should print the name of the job which triggered it.
Output of checks
This bug happens on GitLab.com
Edited by Tristan