VCS (Subversion) executing script before SVN::Update

Hi,

We are using TeamCity 4.5.4 (build 9071), and I would like to run a script (.bat) before the VCS (SVN update) occurs. The update is done "Automatically on Agent".

Is there a way to configure TeamCity (Version Control Setting) to perform this within the same build configuration?

Thanks

Ste

5 comments
Comment actions Permalink

Hello Stephane,

  I'm afraid this is not possible currently. Why would you want it?

  Regards,
  KIR

0
Comment actions Permalink

Hi Kirill, thanks for the answer.

This is required in our situation because there is lot of activities on the agent and sometime the SNV workspaces (branches) get locked, and necessitates a SVN CleanUp.

So, I was wondering if a pre-svn-update script was possible to perform a svn-cleanup.

My guess to solve this will be adding a build configuration performing the svn-cleanup on which my build configuration doing the svn-update + the compilation will depend on.

Thanks

Ste

0
Comment actions Permalink

Hi Ste,

   For you solution to work, please ensure the following:
  1. both configurations have the same checkout directory (you can specify it explicitly in VCS settings).
  2. first configuration doesn't do the checkout (otherwise it will try to checkout first before running svn cleanup)
  3. both configurations always run on the same build agent (actually, we don't have an option to enforce this yet, consider voting for this issue)

  I'd also suggest the following alternatives:

  - run svn cleanup not before, but after the build from your script
  - use manual checkout mode instead checkout on agent (your script can obtain the version to checkout from system property like build.vcs.number)

  Hope this helps,
  KIR

0
Comment actions Permalink

Hello Kirill,

When mentioning "manual checkout mode instead checkout on agent", you mean selecting "Do not checkout files automatically" and have the Runner calling a script performing the “svn-cleanup + svn-update + building the component”, am I right? or there is an option in TeamCity (4.5.4) for manual checkout that I am not aware of?

Thanks

Ste

0
Comment actions Permalink

Yes, I mean option "Do not checkout files automatically"

Regards,
KIR

0

Please sign in to leave a comment.