Referencing global variable in parallel:metrix is not working

Hi all,

I have the following gitlab-ci.yaml

variables:
  # project name value will be used to prefix DAG names (should be lowercase with underscores instead of dashes)
  PROJECT_DOMAINS: demo1 demo2 demo3
  DOMAINS:  ${PROJECT_DOMAINS// /$','} #

stages:
  - test

test:
  stage: test
  script: echo "$PROJECT_DOMAINS"
  parallel:
    matrix:
      - DOMAIN: [$DOMAINS]
  tags: [ bi ]

It is not working and not getting the values for DOMAINS in the global variable.
Screenshot 2023-06-15 at 10.11.13

My question is how can I achieve this?

Thanks

variables cannot be used like that. It’s not supported. Places where variables can be used is documented here Where variables can be used | GitLab

If it’s a must have for you, you need to use dynamic child pipelines and generate the job list yourself.