Bridge job rules:variables not containing given variables

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 as 1 and VAR2 as a if the variable KEY is set to A1. 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