パイプライン定義

パイプラインは、CI/CD のプロセスを記述する 1 つ以上のステージです。

パイプラインは、CI/CD のプロセスを記述する 1 つ以上のジョブです。

実装

実装 説明
パイプライン: ステージ ステージを含むパイプライン。
pipeline: extends テンプレートを拡張するパイプライン。
pipeline: jobs ジョブと 1 つの暗黙的なステージを含むパイプライン。
パイプライン: 手順 ステップと 1 つの暗黙的なジョブを含むパイプライン。
実装 説明
pipeline: jobs ジョブを含むパイプライン。
パイプライン: 手順 ステップと 1 つの暗黙的なジョブを含むパイプライン。

注釈

パイプラインは、CI/CD のプロセスを記述する 1 つ以上のステージです。 ステージは、パイプラインの大きな区分です。 "このアプリをビルドする"、"これらのテストを実行する"、"実稼働前環境にデプロイする" の各ステージはその良い例です。

ステージは 1 つ以上のジョブであり、これは、同じマシンに割り当て可能な作業の単位です。 ステージとジョブの両方を依存関係グラフに配置できます。 この例には、"このステージをそのステージの前に実行する" や "このジョブはそのジョブの出力に依存する" が含まれます。

ジョブは、順番に実行される一連のステップです。 ステップは、タスク、スクリプト、または外部テンプレートへの参照である場合があります。

この階層は、次のように、YAML ファイルの構造に反映されます。

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

単純なパイプラインでは、これらのレベルがすべて必要なわけではありません。 たとえば、単一ジョブ ビルドでは、ステップしかないため、ステージとジョブのコンテナーを省略できます。 また、この記事に示されている多くのオプションは必須ではなく、適切な既定値を持っているため、YAML 定義にそのすべてが含まれていることはあまりありません。

パイプラインは、CI/CD のプロセスを記述する 1 つ以上のジョブです。 ジョブは、同じコンピューターに割り当てることができる作業の単位です。 "このジョブは、そのジョブの出力に依存する" のような依存関係グラフにジョブを配置できます。

ジョブは、順番に実行される一連のステップです。 ステップは、タスク、スクリプト、または外部テンプレートへの参照である場合があります。

この階層は、次のように、YAML ファイルの構造に反映されます。

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

単一ジョブのパイプラインの場合、ステップしかないため、ジョブ コンテナーを省略できます。 また、この記事に示されている多くのオプションは必須ではなく、適切な既定値を持っているため、YAML 定義にそのすべてが含まれていることはあまりありません。

1 つのステージがある場合は、キーワード (keyword)をstages省略し、ジョブキーワード (keyword)を直接指定できます。

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

1 つのステージと 1 つのジョブがある場合は、stagesjobs キーワードを省略し、steps キーワードを直接指定できます。

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

ジョブが 1 つの場合は、jobs キーワードを省略し、steps キーワードを直接指定できます。

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

プロパティを name 使用して、パイプラインの実行番号を構成します。 詳細については、「 実行番号またはビルド番号を構成する」を参照してください。

パイプライン: ステージ

ステージを含むパイプライン。

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.

プロパティ

stagesステージ。 必須。
ステージは、人間の介入なしに実行できるジョブのグループです。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

appendCommitMessageToRunNameboolean
ビルド番号にコミット メッセージを追加します。 既定値は true です。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート のパラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

lockBehavior 文字列。
このステージからの動作ロック要求は、他の排他的ロック要求に関連して示す必要があります。 sequential |runLatest。

パイプライン: ステージ

ステージを含むパイプライン。

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.

プロパティ

stagesステージ。 必須。
ステージは、人間の介入なしに実行できるジョブのグループです。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

許可されているプレースホルダーについては、「 実行番号またはビルド番号を構成 する」を参照してください。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート のパラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

lockBehavior 文字列。
このステージからの動作ロック要求は、他の排他的ロック要求に関連して示す必要があります。 sequential |runLatest。

パイプライン: ステージ

ステージを含むパイプライン。

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.

プロパティ

stagesステージ。 必須。
ステージは、人間の介入なしに実行できるジョブのグループです。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート のパラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

パイプライン: ステージ

ステージを含むパイプライン。

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.

プロパティ

stagesステージ。 必須。
ステージは、人間の介入なしに実行できるジョブのグループです。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート のパラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

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

テンプレートを拡張するパイプライン。

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.

プロパティ

extendsは拡張されます。 必須。
テンプレートを拡張します。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

appendCommitMessageToRunNameboolean
ビルド番号にコミット メッセージを追加します。 既定値は true です。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート のパラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

lockBehavior 文字列。
このステージからの動作ロック要求は、他の排他的ロック要求に関連して示す必要があります。 sequential |runLatest。

pipeline: extends

テンプレートを拡張するパイプライン。

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.

プロパティ

extendsは拡張されます。 必須。
テンプレートを拡張します。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート のパラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

lockBehavior 文字列。
このステージからの動作ロック要求は、他の排他的ロック要求に関連して示す必要があります。 sequential |runLatest。

pipeline: extends

テンプレートを拡張するパイプライン。

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.

プロパティ

extendsは拡張されます。 必須。
テンプレートを拡張します。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート パラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

pipeline: extends

テンプレートを拡張するパイプライン。

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.

プロパティ

extendsは拡張されます。 必須。
テンプレートを拡張します。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート パラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

パイプライン: ジョブ

ジョブと 1 つの暗黙的なステージを含むパイプライン。

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.

プロパティ

jobsジョブ。 必須。
ジョブは、単一のエージェントまたはサーバーに割り当てることができる作業単位を表します。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

appendCommitMessageToRunNameboolean
ビルド番号にコミット メッセージを追加します。 既定値は true です。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート パラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

lockBehavior 文字列。
このステージからの動作ロック要求は、他の排他ロック要求に関連して発生する必要があります。 sequential |runLatest。

パイプライン: ジョブ

ジョブと 1 つの暗黙的なステージを含むパイプライン。

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.

プロパティ

jobsジョブ。 必須。
ジョブは、単一のエージェントまたはサーバーに割り当てることができる作業単位を表します。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート パラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

lockBehavior 文字列。
このステージからの動作ロック要求は、他の排他ロック要求に関連して発生する必要があります。 sequential |runLatest。

パイプライン: ジョブ

ジョブと 1 つの暗黙的なステージを含むパイプライン。

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.

プロパティ

jobsjobs。 必須。
ジョブは、単一のエージェントまたはサーバーに割り当てることができる作業単位を表します。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート のパラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

pipeline: jobs

ジョブと 1 つの暗黙的なステージを含むパイプライン。

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.

プロパティ

jobsjobs。 必須。
ジョブは、単一のエージェントまたはサーバーに割り当てることができる作業単位を表します。

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート のパラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

pipeline: 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.

プロパティ

jobsjobs。 必須。
ジョブは、単一のエージェントまたはサーバーに割り当てることができる作業単位を表します。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

prpr.
Pull request トリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

parameters テンプレート パラメーター。
パイプライン テンプレート のパラメーター。

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"

パイプライン: 手順

ステップと 1 つの暗黙的なジョブを含むパイプライン。

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.

プロパティ

steps手順を実行します。 必須。
このジョブで実行する手順の一覧。

strategyjobs.job.strategy
このジョブの実行戦略。

continueOnError 文字列。
障害が発生しても実行を続けますか?

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

containerjobs.job.container
コンテナー リソース名。

services 文字列ディクショナリ。
サービス コンテナーとして実行するコンテナー リソース。

workspaceワークスペース
エージェントのワークスペース オプション。

name 文字列。
パイプラインの実行番号。

appendCommitMessageToRunNameboolean
ビルド番号にコミット メッセージを追加します。 既定値は true です。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート のパラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

lockBehavior 文字列。
このステージからの動作ロック要求は、他の排他的ロック要求に関連して示す必要があります。 sequential |runLatest。

パイプライン: 手順

ステップと 1 つの暗黙的なジョブを含むパイプライン。

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.

プロパティ

steps手順を実行します。 必須。
このジョブで実行する手順の一覧。

strategyjobs.job.strategy
このジョブの実行戦略。

continueOnError 文字列。
失敗しても実行を続けますか?

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

containerjobs.job.container
コンテナー リソース名。

services 文字列ディクショナリ。
サービス コンテナーとして実行するコンテナー リソース。

workspaceワークスペース
エージェントのワークスペース オプション。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート パラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

lockBehavior 文字列。
このステージからの動作ロック要求は、他の排他ロック要求に関連して発生する必要があります。 sequential |runLatest。

パイプライン: ステップ

ステップと 1 つの暗黙的なジョブを含むパイプライン。

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.

プロパティ

steps手順を実行します。 必須。
このジョブで実行する手順の一覧。

strategyjobs.job.strategy
このジョブの実行戦略。

continueOnError 文字列。
失敗しても実行を続けますか?

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

containerjobs.job.container
コンテナー リソース名。

services 文字列ディクショナリ。
サービス コンテナーとして実行するコンテナー リソース。

workspaceワークスペース
エージェントのワークスペース オプション。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート パラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

パイプライン: ステップ

ステップと 1 つの暗黙的なジョブを含むパイプライン。

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.

プロパティ

steps手順を実行します。 必須。
このジョブで実行する手順の一覧。

strategyjobs.job.strategy
このジョブの実行戦略。

continueOnError 文字列。
失敗しても実行を続けますか?

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

containerjobs.job.container
コンテナー リソース名。

services 文字列ディクショナリ。
サービス コンテナーとして実行するコンテナー リソース。

workspaceワークスペース
エージェントのワークスペース オプション。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

parametersパラメーター
パイプライン テンプレート パラメーター。

prpr.
Pull request トリガー。

schedulesスケジュール。
スケジュールされたトリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

パイプライン: ステップ

ステップと 1 つの暗黙的なジョブを含むパイプライン。

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.

プロパティ

steps手順を実行します。 必須。
このジョブで実行する手順の一覧。

strategyjobs.job.strategy
このジョブの実行戦略。

continueOnError 文字列。
障害が発生しても実行を続けますか?

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

containerjobs.job.container
コンテナー リソース名。

services 文字列ディクショナリ。
サービス コンテナーとして実行するコンテナー リソース。

workspaceワークスペース
エージェントのワークスペース オプション。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

prpr.
Pull request トリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

parameters テンプレート パラメーター。
パイプライン テンプレート のパラメーター。

パイプライン: 手順

ステップと 1 つの暗黙的なジョブを含むパイプライン。

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.

プロパティ

steps手順を実行します。 必須。
このジョブで実行する手順の一覧。

strategyjobs.job.strategy
このジョブの実行戦略。

continueOnError 文字列。
障害が発生しても実行を続けますか?

poolプール
特に指定がない限り、このパイプライン内のジョブが実行されるプール。

services 文字列ディクショナリ。
サービス コンテナーとして実行するコンテナー リソース。

workspaceワークスペース
エージェントのワークスペース オプション。

name 文字列。
パイプラインの実行番号。

triggerトリガー
継続的インテグレーション トリガー。

prpr.
Pull request トリガー。

resourcesリソース
ビルドで使用されるコンテナーとリポジトリ。

variables変数
このパイプラインの変数。

parameters テンプレート パラメーター。
パイプライン テンプレート のパラメーター。

trigger:
- main

pool: 
  vmImage: ubuntu-latest

steps:
- script: "Hello world!"

関連項目