TeamCity Pipelines Help

Pipeline Settings

This document explains core Pipeline settings available in the settings pane. To view available Pipeline settings, click Edit... next to its title.

Pipeline Settings

Parameters

Parameters are name-value pairs. When TeamCity encounters the %parameter_name%\ syntax, it inserts the corresponding parameter's value instead. This technique can be helpful if you want to use aliases instead of actual values or pass the same value to multiple Steps.

In the Create a Multi-Job Pipeline tutorial, Job #2 runs the following script:

docker build . --pull --file ./docker/Dockerfile --tag myusername/myrepositoryname:mycustomtag docker push myusername/myrepositoryname:mycustomtag

If you create the "DockerRepo = myusername/myrepositoryname" and "ImageName = mycustomtag" parameters, you can rewrite this script as follows:

docker build . --pull --file ./docker/Dockerfile --tag %DockerRepo%:%ImageName% docker push %DockerRepo%:%ImageName%

Not only does this modification shorten your script body and make it more readable, but it also allows you to keep both values easily accessible. Should you require to change the repository or image name, you can do so from the Pipeline settings pane without tweaking script commands.

Secrets

Secrets are parameters whose actual values are stored securely by TeamCity and hidden away from web UI, logs, YAML configurations, and other locations. Use secrets to reference sensitive information (passwords, keys, access tokens, and so on) as parameters.

Triggers

The Triggers section of the Pipeline settings pane allows you to specify conditions for starting Pipelines automatically.

Build Triggers

The On new changes option is enabled by default, meaning TeamCity runs the Pipeline whenever a new commit is merged into the underlying repository.

You can click the Add... button to create triggers that schedule Pipeline runs at the specified day and time.

Integrations

Integrations are access points for 3rd-party services used by Jobs. Integrations are available for all Jobs in this Pipeline but are initially inactive. To allow a Job to utilize an integration, open this Job's settings pane, expand the Integrations section, and toggle the required switch.

Pipeline Integrations

Docker

This integration allows you to sign in to your DockerHub account before a Job starts and log out when it finishes. For instance, this can be necessary if a Job calls the docker push command to upload an image to a DockerHub repository. See this tutorial for the example: Create a Multi-Job Pipeline.

NPM

Allows Jobs to access a private npm registry during a build (for example, to download a package).

Connection settings:

Setting

Description

Scope

The npm user/organization's scope to associate with the connected registry. If you want to use multiple registries per project, you need to specify a scope for each of them.

Leave empty if you want to use only one registry in this project. It will be used by npm/yarn commands by default.

Registry URL

The npm registry URL in the following format: http(s)://hostname[:port]. For example, https://npm.pkg.jetbrains.space/mycompany/p/projectkey/mynpm. The HTTPS schema is used by default.

Access token

The token, if it is required to access the registry. Leave empty for anonymous access. Note that token-based authentication could differ depending on a registry type. See instructions for npm Enterprise, Space Packages, or GitHub Packages.

Last modified: 10 March 2023