Global variables with manual entry not expanded on trigger jobs
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When using global variables with description and manual trigger, entered value is not expanded properly on rules or trigger/include paths.
Steps to reproduce
Create a pipeline file that uses a global variable as part of a trigger inclusion.
Example Project
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- when: never
stages:
- Maintenance
variables:
MAINTENACE_PIPELINE:
description: Select the maintenance pipeline to run.
value: none
options:
- none
- prune-pipelines
Testing:
stage: Maintenance
script:
- echo MAINTENACE_PIPELINE=$MAINTENACE_PIPELINE
Maintenance:
stage: Maintenance
rules:
- exists:
- pipelines/${MAINTENACE_PIPELINE}.yml
trigger:
include:
- local: pipelines/${MAINTENACE_PIPELINE}.yml
needs:
- Testing
What is the current bug behavior?
In the above situation, the "Testing" job will first echo the expected value selected from the manual variable entry page. Once that is done, the "Maintenance" job will fail due to expansion of the incorrect value. As per documentation, expansion clearly happens. However, instead of using the correct globally set value from the manual trigger, the default value is always appearing those expansion locations.
What is the expected correct behavior?
As per documentation.), variable expansion should work in both rules and trigger. Expansion should occur with the globally set value from the manual trigger.



