Skip to content

Expand CI variables before glob separation

What does this MR do and why?

Expand CI variables before glob separation

We sort globs into three types depending on their content. Doing that before expanding variables can lead to them being sorted incorrectly. In consequence they are also applied incorrectly, leading to missing some matches when variables contain / or **.

Fixes #386595

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Set up new project
  2. Add directory and file folder/file
  3. Add this CI configuration:
    variables:
      dir: "folder"
      file: "file"
      full_path: "folder/file"
    
    a:
      rules:
        - exists:
            - $dir/$file
      script:
        - echo hi
    
    b:
      rules:
        - exists:
            - $full_path
      script:
        - echo hi 
  4. Observe both jobs running with this branch, but only job a running with latest default
Edited by Manuel Grabowski

Merge request reports