How do Teamcity artifact paths work?
Asked Answered
C

2

29

Can anyone give me an example of what the Artifact paths setting defined for a build configuration could look like if I want to create two artifacts dist and source where I am using the sln 2008 build runner and building my projects using the default bin/Release?

**/Source/Code/MyProject/bin/Release/*.* => dist
**/*.* => source

I get two artifact roots dist and source but under dist I get the whole directory structure (Source/Code/MyProject/bin/Release) which I don't want and under source I get the whole thing along with obj and bin/Release which I do not want.

Can you give some advice on how to do this correctly?

Do I need to change the target location for all the projects I am building to be able to get this thing to work?

Cateyed answered 8/10, 2008 at 10:23 Comment(0)
T
29

So you'll just need:

Source\Code\MyProject\bin\Release\* => dist
Source\**\* => source

This will put all the files in release into a artifact folder called dist and everything in Source into a artifact folder called source.

If you have subfolders in Release try:

Source\Code\MyProject\bin\Release\**\* => dist
Titled answered 10/10, 2008 at 8:53 Comment(3)
what happens if your path has a space in it? I've tried path in quotes and using "\ " and neither seems to work....Decussate
How could I use that artifact folder in a dependency? e.g.: B -> A. I set A's artifacts paths in dependencies as "target-directory** => ." I set B's artifacts paths in general settings as "**/ => target_directory" Is it right? ThanksCleary
The reason that the full path is brought over is because the source path has a wildcard in the path (the ** at the start). You either need to define the path in full like in this answer or use params to pass it through.Dyke
A
0

According to TeamCity documentation; it should be like this:

file_name|directory_name|Ant-like wildcard [ => target_directory ]

So..

Source\Code\MyProject\bin\Release|**\* => dist  (| not \)
Anatolio answered 17/12, 2009 at 16:18 Comment(2)
Three years later, I guess not.Devlin
'|' indicates "one of", or "or", so this means "File name" or "directory name" or "ant-like wildcard". The pipe should not be treated literally.Elboa

© 2022 - 2024 — McMap. All rights reserved.