TeamCity On-Premises 2026.1 Help

管理构建队列

构建队列保存等待分配给可用代理的构建。 teamcity queue 命令组可用于查看排队的构建、控制其优先级、批准需要手动批准的构建,以及从队列中移除构建。

列出排队中的构建

视图当前队列中的所有构建:

teamcity queue list

按作业筛选器:

teamcity queue list --job MyProject_Build

限制结果并以 JSON 格式输出:

teamcity queue list --limit 20 teamcity queue list --json teamcity queue list --json=id,state,buildType.name,triggered.user.name,webUrl

队列列表标志

标志

描述

-j--job

按作业(构建配置)ID 筛选器

-n--limit

显示的最大排队运行数量

--json

输出为 JSON。 使用 --json= 可列出可用字段, --json=f1,f2 可查看指定字段。

优先处理构建

将排队的构建移动到队列顶部,赋予其最高优先级:

teamcity queue top 12345

当需要让关键构建优先于队列中的其他构建运行时,这很有用。

批准构建

有些构建配置在运行前需要手动批准。 批准排队的构建:

teamcity queue approve 12345

从队列中移除构建

从队列中移除构建:

teamcity queue remove 12345

使用 --yes 跳过确认提示:

teamcity queue remove 12345 --yes
2026年 8月 6日