Checkout TFS Label

Answered

Hi,

 

Is there a way to checkout code from TFS by Label? I currently have Teamcity (9.1.1) configured to create a label on every QA build & deploy and would like to set it up so that when we do a production build & deploy it should check out code based on that label. This will allow us to deploy code based on previous builds

 I have tried to directly checkout a label by going to Team Explorer and copying the URL but that failed. I have tried at least 10 to 15 different URLs and configurations and still have not been able to get it to work

Thank you

4 comments
Official comment

Hello Sol,

TeamCity does not support getting labeled sources at this time. The feature request is addressed by TW-5061, please vote for it.

Why did you decide to use labels for this purpose? A common approach is to create a build configuration that will produce the artifacts form the sources and then artifact-depend on it via pinned build from others instead of retrieving sources by label in those others all the time. Please find the description of our workflow in the comment.

 

See https://youtrack.jetbrains.com/issue/TW-7370

 

"You can run a build on a specified change[set] manually using Run Custom Build dialog."

0

Rami, thanks for the reply.

 

First of all I don't see that option when I click on Run...

Second, AFAIK a changeset is not a label. http://stackoverflow.com/questions/956451/tfs-labels-vs-changesets

0

When you click on Run..., you should see the "Include changes" field on the "Changes" tab.

 

The work-around applies to how you're labeling your source code.

In the simplest case, a label is created to snapshot a set of files in TFS.

So basically there is a direct relationship with the last changeset since the label was applied.

Selecting to run a build based on that changeset would be the same as running a build on that label, unless you're changing the label or labeling in a different manner.

0

Please sign in to leave a comment.