Bridge (triggering) job does not contain variables from condition by rules:variables
-
Describe your question in as much detail as possible:
What am I doing wrong with giving down conditional variables in a trigger-job to its downstream pipeline?
-
What are you seeing, and how does it differ from what you expect to see?
The following code is given as a template that jobs are extending. The pipeline is triggered successfully. I expect that the downstream pipeline contains
VAR1
as1
andVAR2
asa
if the variableKEY
is set toA1
. However, the variables in the downstream pipeline are empty.
.bridge:
stage: build
trigger:
include:
- project: my-project
ref: feature
file: pipeline-templates/ci-process.yml
strategy: depend
forward:
pipeline_variables: true
rules:
- if: $KEY == A1
variables:
VAR1: 1
VAR2: a
- if: $KEY == A2
variables:
VAR1: 2
VAR2: b
-
Version
GitLab Enterprise Edition 15.6.4-ee
Thank you and best regards!
Taka