Global variable is not expanded in multi-project bridge pipeline
Summary
Global variables defined in upstream project are not expanded properly before passed to downstream project.
Steps to reproduce
See example projects below
Example Project
upstream project
variables:
NAME: $CI_PROJECT_NAME
CNAME: up-$CI_PROJECT_NAME
downstream:
variables:
UPSTREAM_COMMIT: $CI_COMMIT_SHORT_SHA
trigger: username/downstream
downstream project
build:
script:
- echo "$NAME"
- echo "$CNAME"
- echo "$UPSTREAM_COMMIT"
What is the current bug behavior?
Skipping Git submodules setup
$ echo "$NAME"
downstream
$ echo "$CNAME"
up-downstream
$ echo "$UPSTREAM_COMMIT"
90b75b2f
Job succeeded
What is the expected correct behavior?
Skipping Git submodules setup
$ echo "$NAME"
upstream
$ echo "$CNAME"
up-upstream
$ echo "$UPSTREAM_COMMIT"
90b75b2f
Job succeeded
Results of GitLab environment info
System information
System: RedHatEnterpriseServer 7.6
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 2.5.3p105
Gem Version: 2.7.9
Bundler Version:1.17.3
Rake Version: 12.3.2
Redis Version: 3.2.12
Git Version: 2.21.0
Sidekiq Version:5.2.7
Go Version: unknown
GitLab information
Version: 11.11.5-ee
Revision: 9bb97b4d478
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 10.7
URL: removed
HTTP Clone URL: removed
SSH Clone URL: removed
Elasticsearch: no
Geo: no
Using LDAP: yes
Using Omniauth: yes
Omniauth Providers: saml
GitLab Shell
Version: 9.1.0
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Git: /opt/gitlab/embedded/bin/git