如何在 TeamCity 中设置构建代理优先级?
How to set build agent priority in TeamCity?
我有两个代理可以构建我的配置。
我设置了两个,因为我有时需要同时进行两个构建。
我如何设置构建代理优先级以强制 TeamCity 选择特定代理(如果两者都空闲且可用)?
现在它会随机或根据一些未知因素选择代理...
您可以过滤使用了哪些代理,但我不确定您是否可以指定要使用哪个空闲代理。
如果您担心 TeamCity 使用最快的代理,它应该会自动执行此操作。
Teamcity documentation 陈述如下。
When there are several idle agents that can run a queued build, TeamCity tries to select the fastest one as follows:
If no builds have previously run on agents, the CPU rank is used to select an agent.
If builds have previously run on agents, the estimated build duration for the given build configuration is used to select an agent. The estimate is made based on the heuristics of the latest builds in the history of the build configuration; for estimating, the execution time of the more recent builds has more weight than that of the earlier builds. Personal and canceled builds are not taken into account, neither are any individual builds whose duration differs significantly from the rest of the builds for this build configuration.
您可以使用代理参数指定它使用构建代理。
例如,您可以指定构建代理名称(使用 "system.agent.name")或声明您只想将构建代理与 TeamCity CPU 基准(比如 400)一起使用:system.teamcity.agent.cpuBenchmark is more超过 400.
现在可以在 plugin 的帮助下配置代理优先级。
请欣赏 ;)
我有两个代理可以构建我的配置。 我设置了两个,因为我有时需要同时进行两个构建。
我如何设置构建代理优先级以强制 TeamCity 选择特定代理(如果两者都空闲且可用)?
现在它会随机或根据一些未知因素选择代理...
您可以过滤使用了哪些代理,但我不确定您是否可以指定要使用哪个空闲代理。
如果您担心 TeamCity 使用最快的代理,它应该会自动执行此操作。
Teamcity documentation 陈述如下。
When there are several idle agents that can run a queued build, TeamCity tries to select the fastest one as follows:
If no builds have previously run on agents, the CPU rank is used to select an agent.
If builds have previously run on agents, the estimated build duration for the given build configuration is used to select an agent. The estimate is made based on the heuristics of the latest builds in the history of the build configuration; for estimating, the execution time of the more recent builds has more weight than that of the earlier builds. Personal and canceled builds are not taken into account, neither are any individual builds whose duration differs significantly from the rest of the builds for this build configuration.
您可以使用代理参数指定它使用构建代理。
例如,您可以指定构建代理名称(使用 "system.agent.name")或声明您只想将构建代理与 TeamCity CPU 基准(比如 400)一起使用:system.teamcity.agent.cpuBenchmark is more超过 400.
现在可以在 plugin 的帮助下配置代理优先级。 请欣赏 ;)