Passing variables to other pipelines does not work as expected
Summary
Sometimes when passing variables from one pipeline to another does not seem to work as expected.
Steps to reproduce
- In your
.gitlab-ci.yml
file, define a variable (CONTAINER_TEST_IMAGE) - Assign a dynamic value to the variable (
CI_REGISTRY_IMAGE:
CI_COMMIT_REF_SLUG) - In this pipeline, trigger a new pipeline in another project
- In the new pipeline, set the value of
built_image
to $CONTAINER_TEST_IMAGE - The value of
build_image
in the new project will not be the same as CONTAINER_TEST_IMAGE in the original project.
Example Project
What is the current bug behavior?
Dynamic variables are not carried over when a pipeline triggers another pipeline in a different project
What is the expected correct behavior?
Dynamic variables should be carried over when a pipeline triggers another pipeline in a different project
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)