Pre-checkout steps


I'm evaluating TeamCity.  My typical build process is:

  1. Label VCS view
  2. Checkout based on view
  3. Checkin artifacts and attach label from (1)

Right now I'm having issues getting TeamCity to label the view prior to checkout. I do see that it has a build feature that will label after the build, so it knows how to label using my VCS.

I don't have a problem providing a script to do the labeling, but I don't see a good way to invoke steps prior to checkout.

While I can set the VCS checkout mode to "do not checkout files automatically" so I can perform pre-checkout steps, it appears I then have to provide a script in the build steps to checkout files as there isn't a runner type for the VCS itself.   This I do have a problem with.  TC already knows how to checkout what I need so why should I have to provide a script just because I have pre-checkout steps.

Perhaps I'm missing something.  Is there a way to do this?

Thanks in advance.

Comment actions Permalink

Just out of interest because I have never seen such a workflow.
What is the advantage when you assign a lable before the build step?

Why you do not add the label while committing the artifacts?

On the question. To my knowledge this is not possible with a workflow, perhaps the jetbrains employees know more.
For this, to use two workflows looks for a overkill.

Comment actions Permalink

Assigning the label before building frees up my VCS to be modified.  I'm essentially labeling a point in time (the tip) and then I would build off that label.  If you do not do this, changes could be made to the VCS while you are building.

When we check in the artifacts we do in fact label those with the same label as well.

I'm still learning about TeamCity, but it seems desirable to have the checkout to be simply another step in the build.  From what i've seen so far, any automatic checkout TeamCity does must be the first step and it can only be done once.  I base this on the fact that there is no build step that allows a checkout.

Comment actions Permalink

It is not the time stamp but the revision relevant.

When checking out a revision number is stored. At the end of builds exactly this revision is labeled.
This revision parameter can also be accessed in TeamCity (see:

When you want to do it manually e.g. for subversion you can use the "-r" parameter.

Comment actions Permalink

Hi Andy,

There is no bundled functionality to label prior to building. We have the related feature request, please watch/vote for it.
Also TeamCity always labels the revision used for the build, not the current revision (as mar99 described), so this should not be a problem.

Comment actions Permalink

Ah, I knew I was missing something.  With my VCS it's not exactly a revision, but I can see where TeamCity is tracking the timestamps.  As such it creates a view label what appears to be 1 second beyond the last checked in file included in the build when I use the VCS labeling build feature.

Comment actions Permalink

I see.  Thank you Alina.


Please sign in to leave a comment.