Run Pipeline page does not display default variables when using an external CICD configuration file (from another project)
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Global pipeline variables are displayed with default values on the Run Pipeline page. This is working for variables defined in the project’s own .gitlab-ci.yml. However if I change the project settings to use an external CICD configuration (from a different project), Run Pipeline page doesn’t display those variables.
Steps to reproduce
- In Project A, go to
Settings - CICDand expandGeneral pipelines - In
CI/CD configuration filetext field, put a file referencing a different project:path/.custom-ci.yml@group/projectB:ref - Go to Project B and edit the file defined in step 2 as
path/.custom-ci.yml(ifrefwas defined in Step 2, be sure to edit file in the ref, if not defined edit the file in default branch). Save the changes. - Define global variables and save the file. An example like below:
variables:
ENV:
value: "dev"
description: "Destination environment Possible values are: dev, test, staging"
BUILD_PARAMS:
value: "test"
description: "Params to pass to kaniko executor: dev, test, staging, prod"
- Go to Project A,
CICD - Pipelines. ClickRun pipelinebutton. Global variables aren't displayed.
Example Project
https://gitlab.com/test5881/external_ci_test
What is the current bug behavior?
In Project A, go to CICD - Pipelines and click Run pipeline button. No default variables are displayed.
What is the expected correct behavior?
Global variables defined in Project B should be displayed in Project A's Run pipeline page with their values set as default.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
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)