问题
I would like to upload on my TFS 2015 some of the build tasks that are available here https://github.com/Microsoft/vso-agent-tasks. I do have a problem with certain task as they do require a minimum agent version of 1.89.0. My build agents are 1.83.2 version. Now, the question is, how do I update my agents for a given pool? If I do right click the agent pool on my TFS and choose update all agents option, nothing happens. I suppose because the latest version of my agent available on TFS is the 1.83.2. Where can I find the latest version of it and how do I update it?
Note I'm working on premises TFS 2015 and not VSO.
Thanks
回答1:
If you right-click the agent pool and choose "Update all agents", it will upgrade the agents to the version of the on-premise TFS server. For instance, if you initially installed some RC, and upgraded the server to RTM later, some agents might have lower version. Otherwise, as you mentioned, nothing will happen because all agents are up to date.
VSO has a different release model and updates/fixes to its agents are continuously delivered. That's why the version is constantly growing.
Technically it might be possible to grab the source code of the latest VSO agent tasks, and push it to the on-premise version of TFS 2015. However, it is considered an anti-pattern, and the behavior is undocumented and unsupported.
Let me quote build vNext developers from this discussion (see the bottom of the thread):
That is not a supported option. It is very likely that the agent we have in VSO will not work with the on-prem server. You must use the version of the agent that ships with your server.
And:
The behavior is undefined/untested. It may work, may not. The design is for agents to get pulled forward via an auto update process downloaded from your service. The auto update process may alter configs/layout on disk, whatever. That future agent might call REST apis that don't exist, etc... The primary focus for agents is on forward compat so they can lazily get upgraded (via task minimum agent demand, on restart or eventually a scheduled job).
回答2:
Same answer as @Yan, but putting this here because the following error came from nowhere - so I think Microsoft updated the minimum requirements this week.
No agent found in pool Default which satisfies the specified demands:
msbuild visualstudio Agent.Version -gtVersion 1.95.0
For your own hosted agent just right click on the queue, or click the ...
icon.
I had to restart the agent service after a few minutes as it didn't seem to want to by itself. Give it a chance to update properly before doing this.
来源:https://stackoverflow.com/questions/33275256/upgrading-tfs-2015-build-agent