Add stages, dependencies, & conditions

TFS 2017 | TFS 2015

Note

In Microsoft Team Foundation Server (TFS) 2018 and previous versions, build and release pipelines are called definitions, runs are called builds, service connections are called service endpoints, stages are called environments, and jobs are called phases.

The concept of stages varies depending on whether you use YAML pipelines or classic release pipelines.

This version of TFS doesn't support YAML.

Specify stages

This version of TFS doesn't support YAML pipelines.

Specify dependencies

This version of TFS doesn't support YAML pipelines.

Conditions

You can specify the conditions under which each stage runs. By default, a stage runs if it does not depend on any other stage, or if all of the stages that it depends on have completed and succeeded. You can customize this behavior by forcing a stage to run even if a previous stage fails or by specifying a custom condition.

If you customize the default condition of the preceding steps for a stage, you remove the conditions for completion and success. So, if you use a custom condition, it's common to use and(succeeded(),custom_condition) to check whether the preceding stage ran successfully. Otherwise, the stage runs regardless of the outcome of the preceding stage.

Note

Conditions for failed ('JOBNAME/STAGENAME') and succeeded ('JOBNAME/STAGENAME') as shown in the following example work only for YAML pipelines.

This version of TFS doesn't support YAML pipelines.

Specify queuing policies

This version of TFS does not support YAML pipelines.

Specify approvals

This version of TFS doesn't support YAML pipelines.