Not clear how to copy artifacts to development server

Hello guys,

I just started playing with TeamCity (5.0 EAP 10448) and immediatelly ran into the following problem. After build has successfully completed, I need to copy output files (artifacts) to some network location (to which IIS has a virtual directory map), so any successful commit refreshes the dev version of the website. However, I can't ask TeamCity to copy artifacts to network share (docs say destination can be only relative to system/artifacts folder). Okay, fine, I start digging more. I think (i did not try it yet though) I can create another build configuration, make it artifacts dependent on the first one, and select "Command Line" as a builder and add simple "copy A to B" command there. Is it the right/correct approach? I'm a bit confused because this way TC will (will it??) checkout SVN sources twice... and that can be a lengthy operation. Plus it looks to me as a bit of overkill to create a new build configuration for simple "copy files" task... So is there any simpler way to run "post build" command line?


Thank you,

Alexey

5 comments
Comment actions Permalink

Why you cannot copy artifacts from the build itself?
If the build does not allow that then indeed you will have to create separate build configuration which will depend on the first one by artifacts. However there is no need to attach VCS root to this build configuration, so no sources will be taken from SVN. Also you can add dependency trigger to this build configuration to depend on the first configuration. This way this build configuration will be automatically triggered upon successful completion of the first one.

0
Comment actions Permalink

Hello Pavel,

thanks for the reply. I'm not sure what you mean by

Why you cannot copy artifacts from the build itself?


Is there a way to run post-build event (out of the box I mean)? Or attach a second Build Runner to build configuration? As I said, I need to copy artifacts to some UNC path - and a simple BAT file will work for me - but the only way to run it which I found, was to add extra build configuration...

I'm working with MS VS 2008 solution if it matters - not sure again, what does

If the build does not allow that

mean..


Thanks!

Alexey

0
Comment actions Permalink

Well Solution build is not very customizable, you can't run custom tasks here. If you could use NAnt or MSBuild runners you would be able to add copy to the build script. Anyway the approach with second build configuration should work for you. We have a feature request for multiple runners per build configuration, if you wish you can vote for it here: http://youtrack.jetbrains.net/issue/TW-3660

0
Comment actions Permalink

Thanks, Pavel! I will wait for that issue to be implemented

0
Comment actions Permalink

Although it is set to version 5.0, most likely it won't be included into the 5.0 release, we just do not have enough time for this.

0

Please sign in to leave a comment.