Skip to content

Artifacts: no matching files, no files to upload - despite files do exist

Summary

Building dotnet solution, having stages: build, test and deploy. When copying artifacts, I'm getting:

97 Uploading artifacts... 00:02
98 WARNING: src/*/bin/Release/*/: no matching files   
99 WARNING: src/*/obj/Release/*/: no matching files   
100 WARNING: tests/*/bin/Release/*/: no matching files 
101 WARNING: tests/*/obj/Release/*/: no matching files 
102 ERROR: No files to upload                          
104 Job succeeded

Steps to reproduce

Define build stage with:

  artifacts:
    paths:
      # src/<project dir>/bin/<configuration>/<framework>/
      - src/*/bin/${CONFIGURATION}/*/
      - src/*/obj/${CONFIGURATION}/*/
      - tests/*/bin/${CONFIGURATION}/*/
      - tests/*/obj/${CONFIGURATION}/*/

Where $CONFIGURATION = [Debug|Release], and directory structure is:

src/
|--Project1/
|  `--bin/
|     `--Release/
|        `--netcoreapp3.0/
|           `--<files here>
|--Project2
|  `-- ...
tests/
|--Project1.Tests/
|  `--bin/
|     `--Release/
|        `--netcoreapp3.0/
|           `--<files here>
|--Project2.Tests
|  `-- ...

What is the current bug behavior?

Artifacts not found, despite running script ls -R -1 src/*/bin/Release/*/ lists all files properly.

WARNING: src/*/bin/Release/*/: no matching files   
WARNING: src/*/obj/Release/*/: no matching files   
WARNING: tests/*/bin/Release/*/: no matching files 
WARNING: tests/*/obj/Release/*/: no matching files 
ERROR: No files to upload   

What is the expected correct behavior?

Artifacts to be found using standard glob pattern and uploaded.

Output of checks

 Running with gitlab-runner 12.1.0 (de7731dd)
2   on Channel Tech Custom GitLab Runner in GCP yiTxxSAK
Edited by Zdenek Havlin