Multi-project pipelines: Some predefined variables not passing to downstream project

Summary

Customer reported that some variables are not being passed.

In tests, CI_PIPELINE_ID is consistently not being passed. However, other variables tested are being passed.

Steps to reproduce

  1. Pass CI_PIPELINE_ID via a variable in an upstream job e.g. UPSTREAM_CI_PIPELINE_ID
  2. Echo UPSTREAM_CI_PIPELINE_ID.

Customer ticket (internal) with private project reproducing the same behaviour.

Example Project

  • Upstream yml: https://gitlab.com/gitlab-gold/ci-only/blob/master/.gitlab-ci.yml
  • Upstream job showing variables: https://gitlab.com/gitlab-gold/ci-only/-/jobs/288781195
  • Downstream yml: https://gitlab.com/gitlab-gold/downstream-test/blob/master/.gitlab-ci.yml
  • Downstream job showing variables: https://gitlab.com/gitlab-gold/downstream-test/-/jobs/288783456

What is the current bug behavior?

Downstream variable (in this case UPSTREAM_CI_PIPELINE_ID) is blank.

What is the expected correct behavior?

Variable should be the upstream CI_PIPELINE_ID.

Output of checks

GitLab Enterprise Edition 12.3.0-pre 6bae3836

Assignee Loading
Time tracking Loading