pipelinedefinition

En pipeline är en eller flera faser som beskriver en CI/CD-process.

En pipeline är ett eller flera jobb som beskriver en CI/CD-process.

Implementeringar

Implementering Description
pipeline: faser Pipeline med faser.
pipeline: utökar Pipeline som utökar en mall.
pipeline: jobb Pipeline med jobb och en implicit fas.
pipeline: steg Pipeline med steg och ett implicit jobb.
Implementering Description
pipeline: jobb Pipeline med jobb.
pipeline: steg Pipeline med steg och ett implicit jobb.

Kommentarer

En pipeline är en eller flera faser som beskriver en CI/CD-process. Faser är de största divisionerna i en pipeline. Stegen "Skapa den här appen", "Kör dessa tester" och "Distribuera till förproduktion" är bra exempel.

Ett steg är ett eller flera jobb, som är arbetsenheter som kan tilldelas till samma dator. Du kan ordna både faser och jobb i beroendediagram. Exempel är "Kör den här fasen före den" och "Det här jobbet beror på jobbets utdata".

Jobb är linjära serier med steg. Steg kan vara uppgifter, skript eller referenser till externa mallar.

Den här hierarkin återspeglas i strukturen för en YAML-fil som:

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

Enkla pipelines kräver inte alla dessa nivåer. I en enstaka jobbversion kan du till exempel utelämna containrar för faser och jobb eftersom det bara finns steg. Och eftersom många alternativ som visas i den här artikeln inte krävs och har bra standardvärden är det osannolikt att YAML-definitionerna inkluderar alla.

En pipeline är ett eller flera jobb som beskriver en CI/CD-process. Ett jobb är en arbetsenhet som kan tilldelas till samma dator. Du kan ordna jobb i beroendediagram som "Det här jobbet beror på jobbets utdata".

Jobb är linjära serier med steg. Steg kan vara uppgifter, skript eller referenser till externa mallar.

Den här hierarkin återspeglas i strukturen för en YAML-fil som:

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

För pipelines med ett jobb kan du utelämna jobbcontainern eftersom det bara finns steg. Och eftersom många alternativ som visas i den här artikeln inte krävs och har bra standardvärden är det osannolikt att YAML-definitionerna inkluderar alla.

Om du har ett enda steg kan du utelämna nyckelordet stages och ange nyckelordet jobb direkt:

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

Om du har ett enda steg och ett enda jobb kan du utelämna nyckelorden stages och jobs ange nyckelordet steg direkt:

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

Om du har ett enda jobb kan du utelämna nyckelordet jobs och ange nyckelordet steg direkt:

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

Använd egenskapen name för att konfigurera pipelinekörningsnumret. Mer information finns i Konfigurera körnings- eller byggnummer.

pipeline: faser

Pipeline med faser.

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: string # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Egenskaper

stagesfaser. Krävs.
Faser är grupper av jobb som kan köras utan mänsklig inblandning.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

appendCommitMessageToRunNamebooleskt värde.
Lägg till incheckningsmeddelandet i versionsnumret. Standardvärdet är sant.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

lockBehavior Sträng.
Beteendelåsbegäranden från den här fasen bör visas i förhållande till andra exklusiva låsbegäranden. sekventiell | runLatest.

pipeline: faser

Pipeline med faser.

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: string # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Egenskaper

stagesfaser. Krävs.
Faser är grupper av jobb som kan köras utan mänsklig inblandning.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

Se Konfigurera körnings- eller byggnummer för tillåtna platshållare.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

lockBehavior Sträng.
Begäranden om beteendelås från den här fasen bör visas i förhållande till andra begäranden om exklusivt lås. sekventiell | runLatest.

pipeline: faser

Pipeline med faser.

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.

Egenskaper

stagesfaser. Krävs.
Faser är grupper av jobb som kan köras utan mänsklig inblandning.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

pipeline: faser

Pipeline med faser.

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.

Egenskaper

stagesfaser. Krävs.
Faser är grupper av jobb som kan köras utan mänsklig inblandning.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

Exempel

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: utökar

Pipeline som utökar en mall.

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: string # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Egenskaper

extendsutökas. Krävs.
Utökar en mall.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

appendCommitMessageToRunNamebooleskt värde.
Lägg till incheckningsmeddelandet i versionsnumret. Standardvärdet är true.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

lockBehavior Sträng.
Begäranden om beteendelås från den här fasen bör visas i förhållande till andra begäranden om exklusivt lås. sekventiell | runLatest.

pipeline: utökar

Pipeline som utökar en mall.

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: string # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Egenskaper

extendsutökas. Krävs.
Utökar en mall.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

lockBehavior Sträng.
Begäranden om beteendelås från den här fasen bör visas i förhållande till andra begäranden om exklusivt lås. sekventiell | runLatest.

pipeline: utökar

Pipeline som utökar en mall.

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.

Egenskaper

extendsutökas. Krävs.
Utökar en mall.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

pipeline: utökar

Pipeline som utökar en mall.

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.

Egenskaper

extendsutökas. Krävs.
Utökar en mall.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

pipeline: jobb

Pipeline med jobb och en implicit fas.

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: string # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Egenskaper

jobsjobb. Krävs.
Jobb representerar arbetsenheter som kan tilldelas till en enda agent eller server.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

appendCommitMessageToRunNamebooleskt värde.
Lägg till incheckningsmeddelandet i versionsnumret. Standardvärdet är sant.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

lockBehavior Sträng.
Beteendelåsbegäranden från den här fasen bör visas i förhållande till andra exklusiva låsbegäranden. sekventiell | runLatest.

pipeline: jobb

Pipeline med jobb och en implicit fas.

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: string # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Egenskaper

jobsjobb. Krävs.
Jobb representerar arbetsenheter som kan tilldelas till en enda agent eller server.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

lockBehavior Sträng.
Beteendelåsbegäranden från den här fasen bör visas i förhållande till andra exklusiva låsbegäranden. sekventiell | runLatest.

pipeline: jobb

Pipeline med jobb och en implicit fas.

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.

Egenskaper

jobsjobb. Krävs.
Jobb representerar arbetsenheter som kan tilldelas till en enda agent eller server.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

pipeline: jobb

Pipeline med jobb och en implicit fas.

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.

Egenskaper

jobsjobb. Krävs.
Jobb representerar arbetsenheter som kan tilldelas till en enda agent eller server.

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

pipeline: jobb

Pipeline med jobb.

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.

Egenskaper

jobsjobb. Krävs.
Jobb representerar arbetsenheter som kan tilldelas till en enda agent eller server.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

prpr.
Utlösare för pull-begäran.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

parameters mallparametrar.
Parametrar för pipelinemallar.

Exempel

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: steg

Pipeline med steg och ett implicit jobb.

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: string # 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: string # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Egenskaper

stepssteg. Krävs.
En lista över steg som ska köras i det här jobbet.

strategyjobs.job.strategy.
Körningsstrategi för det här jobbet.

continueOnError Sträng.
Vill du fortsätta köra även vid fel?

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

containerjobs.job.container.
Namnet på containerresursen.

services strängordlista.
Containerresurser som ska köras som en tjänstcontainer.

workspacearbetsyta.
Arbetsytealternativ för agenten.

name Sträng.
Pipelinekörningsnummer.

appendCommitMessageToRunNamebooleskt värde.
Lägg till incheckningsmeddelandet i versionsnumret. Standardvärdet är sant.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

lockBehavior Sträng.
Beteendelåsbegäranden från den här fasen bör visas i förhållande till andra exklusiva låsbegäranden. sekventiell | runLatest.

pipeline: steg

Pipeline med steg och ett implicit jobb.

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: string # 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: string # Behavior lock requests from this stage should exhibit in relation to other exclusive lock requests.

Egenskaper

stepssteg. Krävs.
En lista över steg som ska köras i det här jobbet.

strategyjobs.job.strategy.
Körningsstrategi för det här jobbet.

continueOnError Sträng.
Vill du fortsätta köra även vid fel?

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

containerjobs.job.container.
Namnet på containerresursen.

services strängordlista.
Containerresurser som ska köras som en tjänstcontainer.

workspacearbetsyta.
Arbetsytealternativ för agenten.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

lockBehavior Sträng.
Beteendelåsbegäranden från den här fasen bör visas i förhållande till andra exklusiva låsbegäranden. sekventiell | runLatest.

pipeline: steg

Pipeline med steg och ett implicit jobb.

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: string # 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.

Egenskaper

stepssteg. Krävs.
En lista över steg som ska köras i det här jobbet.

strategyjobs.job.strategy.
Körningsstrategi för det här jobbet.

continueOnError Sträng.
Vill du fortsätta köra även vid fel?

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

containerjobs.job.container.
Namnet på containerresursen.

services strängordlista.
Containerresurser som ska köras som en tjänstcontainer.

workspacearbetsyta.
Arbetsytealternativ för agenten.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

pipeline: steg

Pipeline med steg och ett implicit jobb.

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: string # 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.

Egenskaper

stepssteg. Krävs.
En lista över steg som ska köras i det här jobbet.

strategyjobs.job.strategy.
Körningsstrategi för det här jobbet.

continueOnError Sträng.
Vill du fortsätta köra även vid fel?

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

containerjobs.job.container.
Namnet på containerresursen.

services strängordlista.
Containerresurser som ska köras som en tjänstcontainer.

workspacearbetsyta.
Arbetsytealternativ för agenten.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

parametersparametrar.
Parametrar för pipelinemallar.

prpr.
Utlösare för pull-begäran.

schedulesscheman.
Schemalagda utlösare.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

pipeline: steg

Pipeline med steg och ett implicit jobb.

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: string # 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.

Egenskaper

stepssteg. Krävs.
En lista över steg som ska köras i det här jobbet.

strategyjobs.job.strategy.
Körningsstrategi för det här jobbet.

continueOnError Sträng.
Vill du fortsätta köra även vid fel?

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

containerjobs.job.container.
Namn på containerresurs.

services strängordlista.
Containerresurser som ska köras som en tjänstcontainer.

workspacearbetsyta.
Arbetsytealternativ för agenten.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

prpr.
Utlösare för pull-begäran.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

parameters mallparametrar.
Parametrar för pipelinemallar.

pipeline: steg

Pipeline med steg och ett implicit jobb.

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: string # 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.

Egenskaper

stepssteg. Krävs.
En lista över steg som ska köras i det här jobbet.

strategyjobs.job.strategy.
Körningsstrategi för det här jobbet.

continueOnError Sträng.
Vill du fortsätta köra även vid fel?

poolpool.
Pool där jobb i den här pipelinen körs om inget annat anges.

services strängordlista.
Containerresurser som ska köras som en tjänstcontainer.

workspacearbetsyta.
Arbetsytealternativ för agenten.

name Sträng.
Pipelinekörningsnummer.

triggerutlösare.
Utlösare för kontinuerlig integrering.

prpr.
Utlösare för pull-begäran.

resourcesresurser.
Containrar och lagringsplatser som används i versionen.

variablesvariabler.
Variabler för den här pipelinen.

parameters mallparametrar.
Parametrar för pipelinemallar.

Exempel

trigger:
- main

pool: 
  vmImage: ubuntu-latest

steps:
- script: "Hello world!"

Se även