4
votes

I am using Visual studio and TeamCity tools. I have added project in TeamCity. When TeamCity project build succeeded, TeamCity automatically should commit new binaries from bin/Release folder to specifed SVN path(e.g svn:\abc.com\root\trunk ). Does any one know how can I achieve this? Please let me know the steps. Thanks in advance.

2
Do you really want to store such kind of binary in SVN? I don't think it is a good idea. Anyway, I believe in Teamcity you can run shell scripts and you can just do whatever you want (svn import etc) after the build is completeAdrian Shum
Could you please share the working solution @manoj jaiswal ??programoholic

2 Answers

1
votes

Add Command Line build step to your TC configuration, just after the primary build step, containing command commit_build.bat. Create a commit_build.bat file that will commit your artifacts to SVN with the standard svn commands.

Don't forget to commit commit_build.bat into the repo.

0
votes

Our build process includes a "Tag" MsBuild step after the building and unit testing steps are completed. this step cleans up any extra files from the build (e.g. unnecessary external dependencies if you are building a project to be referenced elsewhere) and commits the binaries. this is simply an MsBuild step which runs an MsBuild script tagging the built projects.

you can obtain the list of DLLs the project builds using the TargetOutputs element of the MsBuild call in your script, for example:

<MSBuild Projects="yourSolutions" Targets="Rebuild" Properties="Configuration=Release;Platform=x86">
    <Output ItemName="BinaryOutputs" TaskParameter="TargetOutputs"/>
</MSBuild>

you can then use standard svn commands to commit your files.