强制 TeamCity 基于特定代理进行构建
是否可以在不禁用所有其他连接的代理的情况下强制 TeamCity 在特定代理计算机上构建?
Is it possible, without disabling all other connected agents, to force TeamCity to build on a specific agents machine?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在
构建配置设置
下,转到代理要求
并为特定代理名称设置显式要求
:参数名称:
system.agent.name
条件:
等于
值:
YOUR_SPECIFIC_AGENT_NAME
Under
Build Configuration Settings
go toAgent Requirements
and set anExplicit Requirement
for the specific agent name:Parameter Name:
system.agent.name
Condition:
equals
Value:
YOUR_SPECIFIC_AGENT_NAME
对于一次运行,您可以单击“运行”旁边的 3 个点并定义要运行的代理。
对于长期配置,您应该使用构建的代理要求。
您可以通过编辑文件 ...\buildAgent\conf\buildAgent.properties 向代理添加系统属性
然后您可以在代理要求上定义以检查属性
system.special.property
存在。编辑
使用新版本的 Teamcity (5.0.*),您现在可以编辑代理并选择要在其中运行的配置。
代理,选择代理,兼容配置,选择“仅运行选定的配置”。
For one time run you can click on the 3 dots next to "Run" and define on what agent you want to run.
For a long term configuration you should use the Agent Requirements of the build.
You can add a system property to the agent by editing the file ...\buildAgent\conf\buildAgent.properties
Then you can define on the Agent Requirements to check the property
system.special.property
exists.EDIT
With the new version of Teamcity (5.0.*) you can now edit the Agent and select the configuration you want to run there.
Agents, select an agent, Compatible Configurations, choose "Run selected configurations only".
团队城市>管理>代理>选择代理 > “兼容配置”选项卡:
当前运行配置策略:“仅运行分配的配置”
单击“+ 分配配置”
TeamCity > Administration > Agents > Select an Agent > "Compatible Configurations" tab:
Current run configuration policy: "Run assigned configurations only"
Click "+ Assign configurations"