Teamcity Cli

作者 cline26378461e978无许可证34 个星标收录于 2026年10月8日更新于 2026年10月8日仓库2个月前更新

Use when working with TeamCity CI/CD or when a user provides a TeamCity build URL — drives the `teamcity` CLI for builds, logs, jobs, queues, agents, pools, projects, and pipelines.

仅含说明DevOps & Cloud
AI 生成的概览

通过 TeamCity 命令行工具查看和操作 CI/CD 构建、作业、代理、队列与流水线。

功能
该技能提供使用 teamcity 命令行工具连接 TeamCity CI/CD 服务器的操作说明。内容涵盖认证检查、列出和查看构建(run)、读取失败日志、检查构建链与测试,以及管理作业、项目、VCS 连接、队列、代理和代理池,还包括流水线的拉取、校验与推送。文档同时列出常见陷阱,并指向随附的命令、工作流和输出格式参考文件。
适用场景
适用于处理 TeamCity CI/CD 的场景,例如排查失败的构建、调试构建链,或管理作业、代理和流水线。当用户提供 TeamCity 构建链接并希望查看或处理时也适用。
运行要求
需要安装并配置 teamcity 命令行工具,并通过 TEAMCITY_URL 与 TEAMCITY_TOKEN 或已保存的认证信息访问 TeamCity 服务器。需要能访问该服务器的网络。该技能不包含脚本,仅为说明文档和参考文件。

TeamCity CLI (teamcity)

Quick Start

bash
teamcity auth status                    # Check authenticationteamcity run list --status failure      # Find failed buildsteamcity run log <id> --failed --raw    # Full failure diagnostics

Do not guess flags or syntax. Use the command reference [blocked] or teamcity <command> --help. Builds are runs (teamcity run); build configurations are jobs (teamcity job). Never use --count — use --limit (or -n).

Gotchas

  • Composite builds have empty logs — drill into child builds for the actual failure.
  • Build chains fail bottom-up — deepest failed dependency is the root cause. Use teamcity run tree <id>.
  • --local-changes excludes Kotlin DSL — push .teamcity/ changes before running.
  • TEAMCITY_URL alone bypasses stored auth — set both TEAMCITY_URL and TEAMCITY_TOKEN, or leave unset.
  • Logs: use --raw and dump to a temp file. Builds: use --watch when starting them.
  • VCS triggers aren't always wired up — after pushing a fix you may need to start builds manually.
  • pipeline push does not validate — always teamcity pipeline validate first.
  • GitHub VCS roots: use a GitHub App connection. Never paste a PAT via --auth password. See workflows [blocked].

Core Commands

AreaCommands
Authauth login, logout, status
Buildsrun list, view, start, watch, log, cancel, restart, tests, changes, tree
Artifactsrun artifacts, run download
Metadatarun pin/unpin, run tag/untag, run comment
Jobsjob list, view, create, tree, pause/resume, step list/view/add/delete, param list/get/set/delete, settings list/get/set
Projectsproject list, view, create, tree, param, token put/get, settings export/status
VCS/Connproject vcs list/view/create/delete, project connection list/create/authorize/delete
Queuequeue list, approve, remove, top
Agentsagent list, view, enable/disable, authorize/deauthorize, exec, term, reboot, move
Poolspool list, view, link/unlink
Pipelinespipeline list, view, create, validate, pull, push, schema, delete
APIteamcity api <endpoint> — raw REST access
Linkteamcity link — bind repo via teamcity.toml

Quick Workflows

See Workflows [blocked] for full details on each.

  • Investigate failure: run list --status failure → run log <id> --failed --raw → run tests <id> --failed
  • Debug build chain: run tree <id> → drill to deepest failed child
  • Fix and verify: edit → push → run start --watch (use --local-changes for personal builds)
  • Pipeline lifecycle: pipeline pull <id> → edit → pipeline validate → pipeline push <id>, pipeline schema to get the actual schema from the server
  • GitHub VCS: connection create github-app → connection authorize → install App on repo → vcs create --auth token --connection-id <id>
  • Docker registry: echo $TOKEN | connection create docker -p <id> --name X --url https://ghcr.io --username U --stdin

References

  • Command reference [blocked] — all commands and flags
  • Workflows [blocked] — failure investigation, build chains, connections, pipelines
  • Output formats [blocked] — JSON, plain text, scripting

来源与署名

来源:cline/skills位于skills/teamcity-cli提交2637846

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架