Reputation: 306
I have one simple plan with one simple job.
Tasks:
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)
Upvotes: 14
Views: 22579
Reputation: 1251
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:
Plus, you can define as many Artifact Definitions as you want.
Upvotes: 13
Reputation: 1429
Bamboo uses the "Ant file copy pattern".
**/*
**/.*
) or the creation of an archive.*/*
foo/bar/test.xyz
foo/test.xyz
and bar/test.xyz
You can do more advanced matching; e.g. you can use build/**/*.jar
to copy all jars from a build directory.
For further info see the docs
Upvotes: 3
Reputation: 2535
The best way of doing this is to zip all you artifact together. I created a bash script to do this
cd "toArtifactFolder"
zip -r Artifact .
Then in bamboo project settings you have to edit the Artifact and changed the location to where ever the artifact zip file is
Then in the Copy Pattern just enter the zip file eg Artifact.zip
Upvotes: 3