Team Build 2013 Customization for Applying Label

Viewed 1305

This might be an easy problem, but I am a bit stumped.

I am customizing a TFS 2013 build process to do our brand of versioning, and one of the steps is to apply a label that includes the version just built.

The new 2013 workflow applies a label when it gets sources. To build the custom label, I need the sources to establish the version, as we let the development teams manage their major / minor version parts according to features and fixes. I can easily suppress the automatic labeling; it doesn't appear all that easy to apply the customized label after the fact.

Earlier versions of the Team Build workflows exposed the Workspace and Build Agent context which made this easy. 2013 appears to have encapsulated all this in the new activities.

The LabelWorkspace activity looks correct, but I am having trouble locating Scope and Workspace required values. LabelSources could work as well but appears to be too granular for this purpose.

Regarding GetWorkspace, the documentation online isn't too clear regarding the behavior of this activity, and I don't like the idea of getting all sources redundantly just to acquire a handle on the ambient workspace. I may be misunderstanding this activity.

I also don't like the idea of using the TFS API directly to pre-emptively round trip to get what will be a local file and a known version later in the build process, meaning, I don't want to do labeling at the point in time it is done in the new workflow if it can be avoided, because it appears this will be a lot of redundant code and compute.

Anyone know a direct and easy means to wire this up?

2 Answers
Related