tfs - 由于未找到代理池,配置 TFS2015 构建代理失败。为什么?

标签 tfs build-server tfs-2015

使用现场 TFS2015 提供的 PowerShell 脚本配置构建代理时,脚本出错,因为它在服务器上找不到代理池。

但是,代理池“默认”肯定存在。在另一台服务器上,相同的脚本按预期工作,并运行构建。请参阅下面的脚本输出。

我试图遵循:

  • 在服务器上创建一个新的代理池,并在脚本中引用它。同样的问题“未找到代理池”。
  • 安装了具有最少功能的 Visual Studio 2015。
  • 运行脚本的用户是“构建管理员”和“构建服务帐户”安全组的成员。

  • 是什么导致脚本在代理池验证时失败?

    PS C:\Windows\system32> E:\Build\agentConfigureAgent.ps1
    Enter the name for this agent (default is Agent-SRV001): BUILD002
    Enter the URL for the Team Foundation Server (default is: http://[ip-address]:8080/tfs
    Configure this agent against which agent pool? (default pool name is 'default'):
    Enter the path of work folder for this agent (default is 'E:\Build\agent_work'): E:\Build\Work
    Would you like to install the agent as a Windows Service (Y/N) (default is Y): n
    Would you like to unconfigure any existing agent (Y/N) (default is N; the agent will be updated):
    Configuring agent
    Unblocking files Calling agent configure without /RunningAsService
    Calling agent configure without /Force
    Unable to find a agent pool with the name: default
    WARNING: Configure agent failed, but you might fix this problem by configure with /Force.
    Would you like to try agent configure again with parameter -Force (Y/N): y
    Calling agent configure without /RunningAsService
    Calling agent configure with /Force
    Unable to find a agent pool with the name: default
    E:\Build\agent\ConfigureAgent.ps1 : Configure agent failed. At line:1 char:1
    + E:\Build\agent\ConfigureAgent.ps1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,ConfigureAgent.ps1

    最佳答案

    运行构建过程脚本的用户帐户需要是 Agent Pool Administrator Accounts 的一部分.

    脚本中的错误消息具有误导性。

    关于tfs - 由于未找到代理池,配置 TFS2015 构建代理失败。为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30841277/

    相关文章:

    visual-studio-2012 - 将整个解决方案/项目回滚到 TFS 中的特定变更集?

    c# - Visual Studio 团队服务 : Build Error (Assembly reference cannot be resolved)

    testing - TFS 测试 Controller 只能用于一个项目集合吗?

    msbuild - msdeploy 错误 ERROR_USER_UNAUTHORIZED : Web deployment task failed

    powershell - TFS 2015 自定义构建变量未包含在环境变量中

    visual-studio-2008 - VS2008/TFS 中待更改到剪贴板的文件列表

    continuous-integration - TeamCity - 测试失败时停止构建

    build - bitbucket 管道构建实例的默认实例规范是什么,例如CPU,内存等,我们可以配置吗?

    msbuild - 在构建服务器上构建 UWP 应用程序/库