How to have Bamboo artifacts collect a whole folders?

Vladimir Avdeev picture Vladimir Avdeev · Feb 15, 2013 · Viewed 16.4k times · Source

I have one simple plan with one simple job.

Tasks:

  1. Source code checkout
  2. MSBuild
  3. Run tests
  4. Generate test report

In four steps, my utility generates a test report with screenshots. The report contain absolute links to images. (for example: onclick="window.open('./Screenshots/66ef3a03-8b82-4b40-b49d-b0155e273738.png');return false;").

If I open the report on my local machine, the report works fine, but on Bamboo I receive the error "Page Not Found", because Bamboo has not collected "Screenshots" folder.

How can I set up the Artifact Definition to collect folder with files?

P.S. I tried to set the \*.* copy pattern, but Bamboo collected only files (without folders and subfolders)

Answer

jfajunior picture jfajunior · Aug 7, 2013

You just have to give the folder Location, like "build/", for instance, and then, in the Copy Pattern you can put **/*.* That should copy all the files you want.

Please note that:

  • The location is relative to the build directory. Do not use the absolute path to refer to the location.
  • Asterisks are not supported for Location. For this field, provide the folder name where the file would be located.

Plus, you can define as many Artifact Definitions as you want.