Perform a step between VCS Trigger and checkout

Hi,

Within a build configuration is there anyway of performing a build step before the VCS roots are checked out ?

What I would like to do is have my build...
1.  Before VCS checkout run a command-line script which I have written that will pull out latest Version.h from VCS, update it and check-it back in.
2.  Then perform the usual VCS checkout that will pick up all the usual updates + this updated Version.h
3.  Perform build
4.  Perform label.

I have nearly managed to do this by doing usual VCS attach.  Then having build step 1 call my command-line script to update Version.h and check-it in.  Step performs build. And then I label.  But it means that the label contains the original version.h revision not the amended one.

I realize I could use paired build configurations in that the 1st build configuration Config1 performs the change to Version.h and the 2nd build configuration Config2 then has a Finish Build Trigger on Config1.
But this means I need to use multiple build configurations to achieve this.  Really would like to have all of this contained in a single build configuration.

1 comment
Comment actions Permalink

Hi Michael,

The recommended solution is to store version in TeamCity build parameter (if needed on project level), use it as label and update using service messages it while the build is running.
For your current workflow the best way is to create two build configurations (as you suggested).

0

Please sign in to leave a comment.