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 從公開儲存庫中收錄這些內容。

檢舉或申請下架