I encountered a similar problem in several of our projects. We can solve two different methods (on two different lines).
1) A build steps command has been added that creates a dummy temporary file if the files did not already exist.
In this case, he had to collect the output.pdf file, which would be generated if the tests failed. I added a build step, where if this file was not there, we created the file "missing.pdf". Then what I collect as artifacts is "* .pdf" from this directory. This seems to work very well.
2) On another assembly, we needed to build a set of files using glob.
We made it so that the build step always creates a single empty file in the destination area. So glob always matches something.
These are the best solutions that we have found so far. If you find something better, I'd love to hear about it.
Allen source share