Artifact paths: How do they work?

Hi I am new to team city and wondering how I can create artifacts out of builds. I have been experimenting with the artifacts paths setting in the general settings of a build configuration.
I am using the sln 2008 builder and therefore have a solution file I am building. My projects are built under the default setting bin/Release set in the project files.
I am wondering how I would go about creating a 'dist' artifact containing everything under bin/Release (the built thing) and another artifact that is the source?

My current settings are as follows:

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

Edit: As this editor is interpreting star (*) I have to point out that I am using (star)(star)/Source/Code/MyProject/bin/Release/(star).(star) and (star)(star)/(star).(star).

This does not work as expected but I do however get 2 artifact roots dist and source. Under dist I get however the whole directory structure (Source/Code/Myproject/bin/Release) instead of simply getting all the built files straight under dist. Can you explain to me how I could fix that?

How would I go about getting all the source stuff bundled together so it can be released alongside the built release?

Thanks in advance.

Edited by: Joe Frank on Oct 8, 2008 2:14 PM

Edited by: Joe Frank on Oct 8, 2008 2:15 PM

Edited by: Joe Frank on Oct 8, 2008 2:17 PM

7 comments
Comment actions Permalink

Not following exactly what you are after..

but remember everything is relative to the work directory

If you want an entire directory and its contents just use

DirectoryA => targetdir

I do not know if it maintains folder structures under 'Directory' or flattens it.. I've never had the need to take a whole tree

If you put the stuff after the directory name you are probably just grabbing the files under it rather then the directory itself

0
Comment actions Permalink

So what are you saying? Should I instead specify explicitly each file I want?

0
Comment actions Permalink

No, just drop the /.* stuff at the end of the directory name.

If you just put

DirA\subB => saved


It will take the entire directory named subB and create a folder in the artifact path named 'saved'

0
Comment actions Permalink

But overall - I would think trying to copy all your source into artifacts is going to be very inefficient. It's going to crud up your TeamCity storage for data that is already available elsewhere. Consider tagging your source when you check it out and whatever external process you have that needs the source code - simply checkout based on the tag your build created.

Why duplicate your source in TeamCity's artifacts?

0
Comment actions Permalink

Have you tried this:
Source/Code/MyProject/bin/Release/. => dist
?

If Source/Code/MyProject/bin/Release exists in the build checkout directory (in the root directory of your project) this should work

If you also need to publish source code as artifacts then you should use something like this:

*/ => source

You can read more about supported syntax here: http://www.jetbrains.net/confluence/display/TCD3/Build+Artifact

--
Pavel Sher

0
Comment actions Permalink

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

Does not work. but putting star star at the front works. I have default settings on everything and Source is in the root folder of the build agent / working directory. Why do I need to put a wildcard at the front for this to work? I am using 3.1.1 build 6828

*/ => source

I would like but this would include the bin/Release. How would I get rid of that?

0
Comment actions Permalink

Can you please submit your directory structure when build checkout dir is the base dir? As for the source code, unfortunately it is not possible to exclude files, but you can try to publish artifacts before your project is compiled. Take a look here: http://www.jetbrains.net/confluence/display/TCD3/BuildScriptInteractionwithTeamCity#BuildScriptInteractionwithTeamCity-artPublishing

--
Pavel Sher

0

Please sign in to leave a comment.