Teamcity Cli

作者 JetBrainsac6c1fd83300無授權條款125 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

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 CLI 檢視與管理建置、工作、代理程式、佇列、專案與管線。

功能
此技能指導代理使用 teamcity 命令列工具操作 TeamCity CI/CD。內容涵蓋身分驗證、建置執行與記錄、成品、工作、專案、VCS 連線、佇列、代理程式、集區、管線以及原始 REST API 存取。它也說明失敗調查、建置鏈偵錯、修正後驗證與管線生命週期等工作流程,並介紹輸出格式與常見注意事項。
適用情境
適用於處理 TeamCity CI/CD 的情境,例如調查建置失敗、偵錯建置鏈、管理工作、代理程式或佇列,以及設定管線與 VCS 連線。當使用者提供 TeamCity 建置網址時同樣適用。
執行需求
需要安裝 teamcity CLI,並已對 TeamCity 伺服器完成身分驗證,且能連線至該伺服器。伺服器位址與權杖透過 TEAMCITY_URL、TEAMCITY_TOKEN 等環境變數提供。此技能不含指令碼,僅為指示與參考文件。

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.
  • Select a server per command with TEAMCITY_URL — TEAMCITY_URL=https://cli.teamcity.com teamcity run list uses stored credentials for that server; set TEAMCITY_TOKEN to override them.
  • Read-only mode blocks remote shells — TEAMCITY_RO=1 or per-server ro: true rejects agent exec and agent term before connecting.
  • Multi-root runs: repeat --revision ROOT=SHA[@BRANCH]; ROOT=@BRANCH uses a fetched branch head. Bare SHA pins every root.
  • 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

Cross-origin downloads drop request headers; HTTPS downgrades and cross-origin terminal redirects are rejected.

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/enable
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
Serverserver plugin upload (optionally with --hot-reload)
Pipelinespipeline list, view, create, validate, pull, push, schema, delete
APIteamcity api <endpoint> — raw REST access
Linkteamcity link — bind repo via teamcity.toml

Quick Workflows

Artifact downloads stay within --output: escaping directory symlinks are rejected, and failed transfers preserve existing files.

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 complete schema with enabled runners and features 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

project settings status reports the server’s runtime message and missing DSL context parameters. Its “Recorded” timestamp is when the status was recorded, not the last successful sync.

來源與署名

來源:JetBrains/teamcity-cli位於skills/teamcity-cli提交ac6c1fd

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架