Skip to content

gitlab runner 15.8.1 adding . for empty artifact path

We have a .gitlab-ci.yml file that extends base options so that the job effectively looks like:-

variables:
   CVCI_ARTIFACT_1: "${CVCI_ZIP_ARTIFACT}/*.zip"
   CVCI_ARTIFACT_3: "${CVCI_LIVE_ARTIFACT}/dapi_test_tools-*"
artifacts:
   name: "${CI_JOB_NAME}"
   paths:
     - ${CVCI_ARTIFACT_1}
     - ${CVCI_ARTIFACT_2}
     - ${CVCI_ARTIFACT_3}
     - ${CVCI_ARTIFACT_4}
     - ${CVCI_ARTIFACT_5}
     - ${CVCI_ARTIFACT_6}

In gitlab runners up to 15.7.4 when the variables were note defined no artifacts were uploaded, though a warning was produced:-

install/packages/zip/*.zip: found 8 matching files and directories 
WARNING: : no matching files. Ensure that the artifact path is relative to the working directory 
install/packages/live/dapi_test_tools-*: found 67 matching files and directories 
WARNING: : no matching files. Ensure that the artifact path is relative to the working directory 
WARNING: : no matching files. Ensure that the artifact path is relative to the working directory 
WARNING: : no matching files. Ensure that the artifact path is relative to the working directory 

In 15.8 this now changes to being interpreted as .

Uploading artifacts...
install/packages/zip/*.zip: found 23 matching artifact files and directories 
.: found 21626 matching artifact files and directories 
install/packages/live/dapi_test_tools-*: found 69 matching artifact files and directories 
.: found 21626 matching artifact files and directories 
.: found 21626 matching artifact files and directories 
.: found 21626 matching artifact files and directories 

and these then cause failures when imported in an upstream pipeline as it contains .git etc.