Επεξεργασία

Κοινή χρήση μέσω


pipeline definition

A pipeline is one or more stages that describe a CI/CD process.

A pipeline is one or more jobs that describe a CI/CD process.

Implementations

Implementation Description
pipeline: stages Pipeline with stages.
pipeline: extends Pipeline that extends a template.
pipeline: jobs Pipeline with jobs and one implicit stage.
pipeline: steps Pipeline with steps and one implicit job.
Implementation Description
pipeline: jobs Pipeline with jobs.
pipeline: steps Pipeline with steps and one implicit job.

Remarks

A pipeline is one or more stages that describe a CI/CD process. Stages are the major divisions in a pipeline. The stages "Build this app," "Run these tests," and "Deploy to preproduction" are good examples.

A stage is one or more jobs, which are units of work assignable to the same machine. You can arrange both stages and jobs into dependency graphs. Examples include "Run this stage before that one" and "This job depends on the output of that job."

A job is a linear series of steps. Steps can be tasks, scripts, or references to external templates.

This hierarchy is reflected in the structure of a YAML file like:

- Pipeline
  - Stage A
    - Job 1
      - Step 1.1
      - Step 1.2
      - ...
    - Job 2
      - Step 2.1
      - Step 2.2
      - ...
  - Stage B
    - ...

Simple pipelines don't require all of these levels. For example, in a single-job build, you can omit the containers for stages and jobs because there are only steps. And because many options shown in this article aren't required and have good defaults, your YAML definitions are unlikely to include all of them.

A pipeline is one or more jobs that describe a CI/CD process. A job is a unit of work assignable to the same machine. You can arrange jobs into dependency graphs like "This job depends on the output of that job."

A job is a linear series of steps. Steps can be tasks, scripts, or references to external templates.

This hierarchy is reflected in the structure of a YAML file like:

- Pipeline
  - Job 1
    - Step 1.1
    - Step 1.2
    - ...
  - Job 2
    - Step 2.1
    - Step 2.2
    - ...

For single-job pipelines, you can omit the jobs container because there are only steps. And because many options shown in this article aren't required and have good defaults, your YAML definitions are unlikely to include all of them.

If you have a single stage, you can omit the stages keyword and directly specify the jobs keyword:

# ... other pipeline-level keywords
jobs: [ job | template ]

If you have a single stage and a single job, you can omit the stages and jobs keywords and directly specify the steps keyword:

# ... other pipeline-level keywords
steps: [ script | bash | pwsh | powershell | checkout | task | template | ... ]

If you have a single job, you can omit the jobs keyword and directly specify the steps keyword:

# ... other pipeline-level keywords
steps: [ script | bash | pwsh | powershell | checkout | task | template | ... ]

Use the name property to configure the pipeline run number. For more information, see Configure run or build numbers.

pipeline: stages

Pipeline with stages.

stages: [ stage | template ] # Required. Stages are groups of jobs that can run without human intervention.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
appendCommitMessageToRunName: boolean # Append the commit message to the build number. The default is true.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.
lockBehavior: sequential | runLatest # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Properties

stages stages. Required.
Stages are groups of jobs that can run without human intervention.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

appendCommitMessageToRunName boolean.
Append the commit message to the build number. The default is true.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

lockBehavior string.
Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests. sequential | runLatest.

pipeline: stages

Pipeline with stages.

stages: [ stage | template ] # Required. Stages are groups of jobs that can run without human intervention.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.
lockBehavior: sequential | runLatest # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Properties

stages stages. Required.
Stages are groups of jobs that can run without human intervention.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

See Configure run or build numbers for allowed placeholders.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

lockBehavior string.
Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests. sequential | runLatest.

pipeline: stages

Pipeline with stages.

stages: [ stage | template ] # Required. Stages are groups of jobs that can run without human intervention.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.

Properties

stages stages. Required.
Stages are groups of jobs that can run without human intervention.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

pipeline: stages

Pipeline with stages.

stages: [ stage | template ] # Required. Stages are groups of jobs that can run without human intervention.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.

Properties

stages stages. Required.
Stages are groups of jobs that can run without human intervention.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

Examples

trigger:
- main

pool: 
  vmImage: ubuntu-latest

stages:
- stage: CI
  jobs:
  - job: CIWork
    steps:
    - script: "Do CI work"

- stage: Test
  jobs:
  - job: TestWork
    steps:
    - script: "Do test work"

pipeline: extends

Pipeline that extends a template.

extends: # Required. Extends a template.
  template: string # The template referenced by the pipeline to extend.
  parameters: # Parameters used in the extend.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
appendCommitMessageToRunName: boolean # Append the commit message to the build number. The default is true.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.
lockBehavior: sequential | runLatest # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Properties

extends extends. Required.
Extends a template.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

appendCommitMessageToRunName boolean.
Append the commit message to the build number. The default is true.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

lockBehavior string.
Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests. sequential | runLatest.

pipeline: extends

Pipeline that extends a template.

extends: # Required. Extends a template.
  template: string # The template referenced by the pipeline to extend.
  parameters: # Parameters used in the extend.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.
lockBehavior: sequential | runLatest # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Properties

extends extends. Required.
Extends a template.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

lockBehavior string.
Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests. sequential | runLatest.

pipeline: extends

Pipeline that extends a template.

extends: # Required. Extends a template.
  template: string # The template referenced by the pipeline to extend.
  parameters: # Parameters used in the extend.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.

Properties

extends extends. Required.
Extends a template.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

pipeline: extends

Pipeline that extends a template.

extends: # Required. Extends a template.
  template: string # The template referenced by the pipeline to extend.
  parameters: # Parameters used in the extend.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.

Properties

extends extends. Required.
Extends a template.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

pipeline: jobs

Pipeline with jobs and one implicit stage.

jobs: [ job | deployment | template ] # Required. Jobs represent units of work which can be assigned to a single agent or server.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
appendCommitMessageToRunName: boolean # Append the commit message to the build number. The default is true.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.
lockBehavior: sequential | runLatest # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Properties

jobs jobs. Required.
Jobs represent units of work which can be assigned to a single agent or server.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

appendCommitMessageToRunName boolean.
Append the commit message to the build number. The default is true.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

lockBehavior string.
Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests. sequential | runLatest.

pipeline: jobs

Pipeline with jobs and one implicit stage.

jobs: [ job | deployment | template ] # Required. Jobs represent units of work which can be assigned to a single agent or server.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.
lockBehavior: sequential | runLatest # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Properties

jobs jobs. Required.
Jobs represent units of work which can be assigned to a single agent or server.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

lockBehavior string.
Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests. sequential | runLatest.

pipeline: jobs

Pipeline with jobs and one implicit stage.

jobs: [ job | deployment | template ] # Required. Jobs represent units of work which can be assigned to a single agent or server.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.

Properties

jobs jobs. Required.
Jobs represent units of work which can be assigned to a single agent or server.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

pipeline: jobs

Pipeline with jobs and one implicit stage.

jobs: [ job | deployment | template ] # Required. Jobs represent units of work which can be assigned to a single agent or server.
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.

Properties

jobs jobs. Required.
Jobs represent units of work which can be assigned to a single agent or server.

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

pipeline: jobs

Pipeline with jobs.

jobs: [ job ] # Required. Jobs represent units of work which can be assigned to a single agent or server.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
pr: none | pr | [ string ] # Pull request triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
variables: variables | [ variable ] # Variables for this pipeline.
parameters: # Pipeline template parameters.

Properties

jobs jobs. Required.
Jobs represent units of work which can be assigned to a single agent or server.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

pr pr.
Pull request triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

parameters template parameters.
Pipeline template parameters.

Examples

trigger:
- main

pool: 
  vmImage: ubuntu-latest

jobs:
- job: PreWork
  steps:
  - script: "Do pre-work"

- job: PostWork
  pool: windows-latest
  steps:
  - script: "Do post-work using a different hosted image"

pipeline: steps

Pipeline with steps and one implicit job.

steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # Required. A list of steps to run in this job.
strategy: strategy # Execution strategy for this job.
continueOnError: string # Continue running even on failure?
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
  string: string # Name/value pairs
workspace: # Workspace options on the agent.
  clean: outputs | resources | all # Which parts of the workspace should be scorched before fetching.
name: string # Pipeline run number.
appendCommitMessageToRunName: boolean # Append the commit message to the build number. The default is true.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.
lockBehavior: sequential | runLatest # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Properties

steps steps. Required.
A list of steps to run in this job.

strategy jobs.job.strategy.
Execution strategy for this job.

continueOnError string.
Continue running even on failure?

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

container jobs.job.container.
Container resource name.

services string dictionary.
Container resources to run as a service container.

workspace workspace.
Workspace options on the agent.

name string.
Pipeline run number.

appendCommitMessageToRunName boolean.
Append the commit message to the build number. The default is true.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

lockBehavior string.
Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests. sequential | runLatest.

pipeline: steps

Pipeline with steps and one implicit job.

steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # Required. A list of steps to run in this job.
strategy: strategy # Execution strategy for this job.
continueOnError: string # Continue running even on failure?
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
  string: string # Name/value pairs
workspace: # Workspace options on the agent.
  clean: outputs | resources | all # Which parts of the workspace should be scorched before fetching.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.
lockBehavior: sequential | runLatest # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Properties

steps steps. Required.
A list of steps to run in this job.

strategy jobs.job.strategy.
Execution strategy for this job.

continueOnError string.
Continue running even on failure?

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

container jobs.job.container.
Container resource name.

services string dictionary.
Container resources to run as a service container.

workspace workspace.
Workspace options on the agent.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

lockBehavior string.
Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests. sequential | runLatest.

pipeline: steps

Pipeline with steps and one implicit job.

steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # Required. A list of steps to run in this job.
strategy: strategy # Execution strategy for this job.
continueOnError: string # Continue running even on failure?
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
  string: string # Name/value pairs
workspace: # Workspace options on the agent.
  clean: outputs | resources | all # Which parts of the workspace should be scorched before fetching.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  webhooks: [ webhook ] # List of webhooks.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.

Properties

steps steps. Required.
A list of steps to run in this job.

strategy jobs.job.strategy.
Execution strategy for this job.

continueOnError string.
Continue running even on failure?

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

container jobs.job.container.
Container resource name.

services string dictionary.
Container resources to run as a service container.

workspace workspace.
Workspace options on the agent.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

pipeline: steps

Pipeline with steps and one implicit job.

steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # Required. A list of steps to run in this job.
strategy: strategy # Execution strategy for this job.
continueOnError: string # Continue running even on failure?
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
  string: string # Name/value pairs
workspace: # Workspace options on the agent.
  clean: outputs | resources | all # Which parts of the workspace should be scorched before fetching.
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
parameters: [ parameter ] # Pipeline template parameters.
pr: none | pr | [ string ] # Pull request triggers.
schedules: [ cron ] # Scheduled triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
  packages: [ package ] # List of package resources.
variables: variables | [ variable ] # Variables for this pipeline.

Properties

steps steps. Required.
A list of steps to run in this job.

strategy jobs.job.strategy.
Execution strategy for this job.

continueOnError string.
Continue running even on failure?

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

container jobs.job.container.
Container resource name.

services string dictionary.
Container resources to run as a service container.

workspace workspace.
Workspace options on the agent.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

parameters parameters.
Pipeline template parameters.

pr pr.
Pull request triggers.

schedules schedules.
Scheduled triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

pipeline: steps

Pipeline with steps and one implicit job.

steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | publish | template ] # Required. A list of steps to run in this job.
strategy: strategy # Execution strategy for this job.
continueOnError: string # Continue running even on failure?
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
container: string | container # Container resource name.
services: # Container resources to run as a service container.
  string: string # Name/value pairs
workspace: # Workspace options on the agent.
  clean: outputs | resources | all # Scorch the repo before fetching?
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
pr: none | pr | [ string ] # Pull request triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
variables: variables | [ variable ] # Variables for this pipeline.
parameters: # Pipeline template parameters.

Properties

steps steps. Required.
A list of steps to run in this job.

strategy jobs.job.strategy.
Execution strategy for this job.

continueOnError string.
Continue running even on failure?

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

container jobs.job.container.
Container resource name.

services string dictionary.
Container resources to run as a service container.

workspace workspace.
Workspace options on the agent.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

pr pr.
Pull request triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

parameters template parameters.
Pipeline template parameters.

pipeline: steps

Pipeline with steps and one implicit job.

steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | publish | template ] # Required. A list of steps to run in this job.
strategy: strategy # Execution strategy for this job.
continueOnError: string # Continue running even on failure?
pool: string | pool # Pool where jobs in this pipeline will run unless otherwise specified.
services: # Container resources to run as a service container.
  string: string # Name/value pairs
workspace: # Workspace options on the agent.
  clean: outputs | resources | all # Scorch the repo before fetching?
name: string # Pipeline run number.
trigger: none | trigger | [ string ] # Continuous integration triggers.
pr: none | pr | [ string ] # Pull request triggers.
resources: # Containers and repositories used in the build.
  builds: [ build ] # List of build resources referenced by the pipeline.
  containers: [ container ] # List of container images.
  pipelines: [ pipeline ] # List of pipeline resources.
  repositories: [ repository ] # List of repository resources.
variables: variables | [ variable ] # Variables for this pipeline.
parameters: # Pipeline template parameters.

Properties

steps steps. Required.
A list of steps to run in this job.

strategy jobs.job.strategy.
Execution strategy for this job.

continueOnError string.
Continue running even on failure?

pool pool.
Pool where jobs in this pipeline will run unless otherwise specified.

services string dictionary.
Container resources to run as a service container.

workspace workspace.
Workspace options on the agent.

name string.
Pipeline run number.

trigger trigger.
Continuous integration triggers.

pr pr.
Pull request triggers.

resources resources.
Containers and repositories used in the build.

variables variables.
Variables for this pipeline.

parameters template parameters.
Pipeline template parameters.

Examples

trigger:
- main

pool: 
  vmImage: ubuntu-latest

steps:
- script: "Hello world!"

See also