Set variables that apply for all jobs in the CI config

How can I set variables or config that will apply for all jobs/steps in the pipeline ? I am using Auto Devops.

Currently, I am using as below but I’d like to apply the re-try config to all jobs in the pipeline without duplicating it for every job. Is there a way to do this ?

build:
  retry:
    max: 2
    when:
      - runner_system_failure
      - stuck_or_timeout_failure
      - scheduler_failure
      - stale_schedule
      - unknown_failure

review:
  retry:
    max: 2
    when:
      - runner_system_failure
      - stuck_or_timeout_failure
      - scheduler_failure
      - stale_schedule
      - unknown_failure