Variable in artifacts/paths not working since upgrade to 15.8.0

Hello,

I have problem with using CI/CD variable in arifacts/paths. I have variable APP_BUILD_FOLDER defined on project level with value “edrewe-connector-component/target”.

Following code does not work on gitlab runner version 15.8.0, older versions for example 15.7.1 are ok.

...
  artifacts:
    paths:
      - "${APP_BUILD_FOLDER}/*.jar"
    expire_in: 1 week
...

Output on version 15.8.0:

WARNING: ${APP_BUILD_FOLDER}/*.jar: no matching files 
ERROR: No files to upload        

Output on version 15.7.1

Uploading artifacts...
edrewe-connector-component/target/*.jar: found 1 matching files and directories 

If I replace variable with its content pipeline is ok, so it looks to me variables used in artifact/paths are not correctly expanded in version 15.8.0. Anyone else experiencing this issue?

Thank you for alll answers in advance.
BR,
Martin

I do not have a GitLab 15.8.0 runner at hand, but this standalone config can help reproduce the problem if someone wants to take a look:

variables:
  APP_BUILD_FOLDER: "build"

test-artifacts-path:
  script:
    - mkdir $APP_BUILD_FOLDER 
    - echo "abc" > $APP_BUILD_FOLDER/artifacts.txt
  artifacts:
    paths: 
      - "$APP_BUILD_FOLDER/*.txt"
    expire_in: 1 week 

Out of curiosity, is the CI/CD variable configured in .gitlab-ci.yml or via CI/CD variables setting?

Hi, thank you for your reply. In my case variable APP_BUILD_FOLDER is configured via CI/CD variables setting.

I just tried your snippet with same results. Runner 15.8.0 fails, 15.7.1 is ok.

Thanks for testing. Then I’d say this looks like a bug and should be reported.

Actually, it is reported here: Variable in artifacts/paths not working since upgrade to 15.8.0 (#388948) · Issues · GitLab.org / GitLab · GitLab