Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the correct wildcard syntax to copy TeamCity artifacts to the root of a destination path?

I'm having a small drama with the wildcard syntax in my TeamCity artifact configuration. I want to grab every file matching the pattern myproject.*.dll from any folder and place each DLL in the root of the artifacts path.

Here's what I've got at present:

**/obj/Debug/myproject.*.dll => /

This is grabbing all the DLLs but it's putting them inside the same folder structure as the source so rather than ending up with "myproject.web.dll" in the artifacts I get "Web/obj/debug/myproject.web.dll".

What am I missing here?

like image 524
Troy Hunt Avatar asked Mar 04 '11 23:03

Troy Hunt


2 Answers

I'm afraid you cannot do this in an easy way. You should collect your *.dll locally to a single place, and than use TeamCity's artifacts rule to copy all of them to root directory.

Or, you can enter all paths manually (without ** part)

This is how it works in TC.

like image 193
KIR Avatar answered Nov 05 '22 12:11

KIR


I am not sure you can use the artifact root without it copying the structure. The docs specify

If target directory is omitted the files are published in the root of the build artifacts.

Can you not just use a designated folder name say dist, would this cause issues? If so what are they!

e.g

**/obj/Debug/myproject.*.dll => dist

Update - found some more info in the docs

The files will be published preserving the structure of the directories matched by the wildcard (directories matched by "static" text will not be created). That is, TeamCity will create directories starting from the first occurrence of the wildcard in the pattern.

So if you can be more explicit it may lead to a flatter structure.

like image 35
redsquare Avatar answered Nov 05 '22 12:11

redsquare