TeamCity On-Premises 2026.1 Help

Managing Pipelines

Pipelines are a YAML-based configuration system for defining CI/CD workflows in TeamCity. Each pipeline belongs to a project, references a VCS root, and contains one or more jobs. The teamcity pipeline command group lets you list, inspect, create, and manage pipeline YAML.

Listing pipelines

View all pipelines on the server:

teamcity pipeline list
Listing pipelines

Filter by project:

teamcity pipeline list --project MyProject teamcity pipeline list --project MyProject --json

pipeline list flags

Flag

Description

-p, --project

Filter by project ID

-n, --limit

Maximum number of pipelines to display (default 30)

--json

Output as JSON. Use --json= to list available fields, --json=f1,f2 for specific fields.

Viewing pipeline details

teamcity pipeline view CLI_CiCd teamcity pipeline view CLI_CiCd --json

The view shows the pipeline name, parent project, head build type, and all jobs with their YAML keys and display names.

Validating pipeline YAML

Validate a .teamcity.yml file against the server's JSON schema before pushing:

teamcity pipeline validate teamcity pipeline validate path/to/pipeline.yml

The schema is fetched from the server and cached locally for 24 hours. Use --refresh-schema to force a re-fetch, or --schema to use a local schema file.

validate flags

Flag

Description

--schema

Path to a local JSON schema file

--refresh-schema

Force re-fetch schema from server

Inspecting the pipeline schema

Print the per-instance JSON schema TeamCity uses to validate .teamcity.yml:

teamcity pipeline schema
Inspecting and saving the pipeline JSON schema

The schema reflects the runners, parameters, and constructs available on the connected server, so it can drift between TeamCity versions. The CLI caches it locally for 24 hours; pass --refresh to bypass the cache and re-fetch from the server:

teamcity pipeline schema --refresh

If the server predates TeamCity 2026.1 (no schema endpoint), the command prints an embedded fallback schema and writes a warning to stderr.

Creating a pipeline

Create a new pipeline from a YAML file:

teamcity pipeline create my-pipeline --project CLI teamcity pipeline create my-pipeline --project CLI --vcs-root MyVcsRoot teamcity pipeline create my-pipeline --project CLI --file pipeline.yml

When --vcs-root is omitted, an interactive prompt lists VCS roots available in the project.

create flags

Flag

Description

-p, --project

Parent project ID (required)

--vcs-root

VCS root ID. Use teamcity project vcs list to discover available roots.

-f, --file

Path to pipeline YAML file (default .teamcity.yml)

Downloading pipeline YAML

Download the YAML source for a server-stored pipeline:

teamcity pipeline pull CLI_CiCd teamcity pipeline pull CLI_CiCd -o .teamcity.yml

Output goes to stdout by default, making it pipe-friendly. Use -o to write to a file.

Uploading pipeline YAML

Push updated YAML to a server-stored pipeline:

teamcity pipeline push CLI_CiCd teamcity pipeline push CLI_CiCd pipeline.yml

When no file is specified, the CLI reads .teamcity.yml from the current directory.

Deleting a pipeline

teamcity pipeline delete CLI_MyPipeline teamcity pipeline delete CLI_MyPipeline --yes

A confirmation prompt is shown unless --yes is passed.

Managing secrets

Pipeline secrets use credentialsJSON: tokens. Create a token in the pipeline's project, then reference it in your YAML:

# Create the pipeline first teamcity pipeline create my-pipeline --project CLI # Store a secret in the pipeline's project teamcity project token put CLI_MyPipeline "my-api-key" # Output: credentialsJSON:2d3c2507-4840-...

Reference the token in your pipeline YAML:

secrets: env.API_KEY: credentialsJSON:2d3c2507-4840-...

Then push:

teamcity pipeline push CLI_MyPipeline

Pipelines in other commands

Project tree

teamcity project tree shows pipelines alongside jobs, marked with :

teamcity project tree CLI
CLI CLI ├── CI CLI_CiCd ⬡ pipeline · 6 jobs └── Build CLI_Build

Pipeline-generated sub-projects and virtual build types are hidden automatically.

Run view

When viewing a pipeline run, the CLI shows the pipeline name and lists all jobs:

teamcity run view 5800
✓ CI ⬡ 5800 #727 · main Triggered by vcs · 3h ago · Took 8m 17s Pipeline Jobs: lint Lint (build 5801) test_linux Test Linux (build 5803) goreleaser GoReleaser (build 5806)

Run tree

teamcity run tree detects pipeline runs and displays a flat job list with a status summary instead of a generic dependency tree:

teamcity run tree 6708
Pipeline run tree

Job list

teamcity job list hides pipeline head build types by default. Use --all to show them:

teamcity job list --project CLI # hides pipeline heads teamcity job list --project CLI --all # shows everything

Running a pipeline

Pipelines are triggered through the standard run start command using the pipeline head build type ID:

teamcity run start CLI_CiCd teamcity run start CLI_CiCd --watch
06 May 2026