TFS 2017 (v15) How to configure an affinity betwee

2019-07-30 16:59发布

问题:

We have two self-hosted build agents configured on two machines, only one of which has the capability of accessing the UAT target environment via NetBIOS and winRM. So we need to make sure that UAT releases get run from this build agent and not the other one.

Is there way to create this affinity in TS2017? In previous versions you could assign tag properties to agents, as a way of defining affinity, but this appears to no longer be a solution for 2017.

回答1:

The answer - agent tags have been replaced with Capabilities in TFS:

Every agent has a set of capabilities that indicate what it can do. Capabilities are name-value pairs that are either automatically discovered by the agent software, in which case they are called system capabilities, or those that you define, in which case they are called user capabilities.

You can set the capabilities of an agent by navigating to Agent queues -> Select desired agent -> Capabilities tab

You can then associate something called a Demand to a release definition environment to tell it what agent capabilities are required. To do this edit the release definition, select the desired environment -> select "Run on agent" link -> Demands.



标签: tfs tfs2017