Run SVN Commit after Labeling a Build

I am trying to commit the msi file created during a build to SVN tagged directory. For this I added a command line build step that runs the following batch file. The batch file takes buildnumber as command line argument .
I see the Build step is running before the tag/Labelling has occured in SVN, which basically means I am trying to use a SVN location that does not exist yet (svn checkout svn://vis/TestProj/tags/eTestProjTool-1.0.42/TestProj/TestProjInstaller/Release).
What I need is a way to Tell Team City to Run the batch file after it has labelled the source files in SVN, How do I do that?

....................................Batch File ...........................................
set BuildNumber=%1
svn checkout svn://vis/TestPrj/tags/TestProjTool-%BuildNumber:~0%/TestProj/TestProjInstaller/Release
cd Release

svn resolved TestProjInstaller.msi
svn resolved setup.exe
svn add . --force
svn commit -m %BuildNumber%
cd ..
---------------------------------end---------------------------------------------------------
But this build step gets stuck

.................................TC Build log for step 2, command line .............................
Step 2/2: Commit Installer to SVN (Command Line) (9m:07s)

[12:34:39][Step 2/2] Starting: C:\TeamCity\buildAgent\work\b38ec087029727\TestProj\TestProjInstaller\svnCheckin.bat 1.0.42

[12:34:39][Step 2/2] in directory: C:\TeamCity\buildAgent\work\b38ec007029727

[12:34:39][Step 2/2]

[12:34:39][Step 2/2] C:\TeamCity\buildAgent\work\b38ec007029727>set BuildNumber=1.0.42

[12:34:39][Step 2/2]

[12:34:39][Step 2/2] C:\TeamCity\buildAgent\work\b38ec00387029727>svn checkout svn://vis/TestProj/tags/eTestProjTool-1.0.42/TestProj/TestProjInstaller/Release

[12:34:39][Step 2/2] Authentication realm: <svn://vis:xxxx> TestProj

[12:43:46][Step 2/2] Password for 'SYSTEM':

[12:43:46][Step 2/2] Process exited with code 1

[12:43:46][Step 2/2] Step Commit Installer to SVN (Command Line) interrupted  /// Stopped Build Manually
[12:43:46]Reverting patched assembly versions

[12:43:46]Build was interrupted. Artifacts will not be published for this build

[12:43:46]Build canceled
................................................................end......................................................

1 comment
Comment actions Permalink

Hi

Storing build artifacts in version control system is usually a bad practice, so we don't support it out of the box.
Try to label the sources within your biuld script, and do not use TeamCity's feature.

0

Please sign in to leave a comment.