jobs.job 定義
jobs:
- job: string # Required as first property. ID of the job.
displayName: string # Human-readable name for the job.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this job.
continueOnError: string # Continue running even on failure?
timeoutInMinutes: string # Time to wait for this job to complete before the server kills it.
cancelTimeoutInMinutes: string # Time to wait for the job to cancel before forcibly terminating it.
variables: variables | [ variable ] # Job-specific variables.
strategy: strategy # Execution strategy for this job.
pool: string | pool # Pool where this job will run.
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.
uses: # Any resources required by this job that are not already referenced.
repositories: [ string ] # Repository references.
pools: [ string ] # Pool references.
steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # A list of steps to run.
templateContext: # Job related information passed from a pipeline when extending a template.
jobs:
- job: string # Required as first property. ID of the job.
displayName: string # Human-readable name for the job.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this job.
continueOnError: string # Continue running even on failure?
timeoutInMinutes: string # Time to wait for this job to complete before the server kills it.
cancelTimeoutInMinutes: string # Time to wait for the job to cancel before forcibly terminating it.
variables: variables | [ variable ] # Job-specific variables.
strategy: strategy # Execution strategy for this job.
pool: string | pool # Pool where this job will run.
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.
uses: # Any resources required by this job that are not already referenced.
repositories: [ string ] # Repository references.
pools: [ string ] # Pool references.
steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # A list of steps to run.
jobs:
- job: string # Required as first property. ID of the job.
displayName: string # Human-readable name for the job.
dependsOn: string | [ string ] # Any jobs which must complete before this one.
condition: string # Evaluate this condition expression to determine whether to run this job.
continueOnError: string # Continue running even on failure?
timeoutInMinutes: string # Time to wait for this job to complete before the server kills it.
cancelTimeoutInMinutes: string # Time to wait for the job to cancel before forcibly terminating it.
variables: variables | [ variable ] # Job-specific variables.
strategy: strategy # Execution strategy for this job.
pool: string | pool # Pool where this job will run.
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.
steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # A list of steps to run.
特性
job
文字列。 最初のプロパティとして必要です。
ジョブの ID。 有効な値: 有効な名前には英数字と '_' のみを含め、先頭に数字を指定することはできません。
displayName
文字列。
ジョブの人間が判読できる名前を します。
文字列 dependsOn
|文字列リスト。
このジョブの前に完了する必要があるジョブ。
condition
文字列。
この条件式を評価して、このジョブを実行するかどうかを判断します。
continueOnError
文字列。
障害が発生しても実行を続行しますか?
timeoutInMinutes
文字列。
サーバーがジョブを強制終了する前に、このジョブが完了するまで待機する時間です。
cancelTimeoutInMinutes
文字列。
ジョブを強制的に終了する前に、ジョブが取り消されるのを待つ時間です。
variables
変数。
ジョブ固有の変数を します。
jobs.job.strategyを strategy
します。
このジョブの実行戦略を します。
プールを pool
します。
このジョブを実行するプールを します。
jobs.job.containerを container
します。
コンテナー リソース名を します。
文字列ディクショナリ services
します。
サービス コンテナーとして実行するコンテナー リソースを します。
ワークスペースを workspace
します。
エージェントの [ワークスペース] オプションを します。 クリーン オプションを含むワークスペースの詳細については、「ジョブの ワークスペース」トピックを参照してください。
jobs.job.usesを uses
します。
まだ参照されていない、このジョブで必要なリソース。
uses
の詳細については、「参照先の Azure DevOps リポジトリにジョブ承認スコープを制限するを参照してください。
手順steps
します。
実行する手順の一覧を示します。
templateContext を templateContext
します。
テンプレートを拡張するときにパイプラインから渡されるジョブ関連情報を します。 詳細については、「解説」を参照してください。
templateContext
の詳細については、「拡張 YAML パイプライン テンプレート 、ステージ、ジョブ、デプロイのコンテキスト情報を渡す および テンプレートを使用する - templateContext を使用して、のテンプレートにプロパティを渡す」を参照してください。
注釈
既定の timeoutInMinutes
は 60 分に設定されています。 詳細については、「タイムアウト」を参照してください。
ジョブは条件付きで 実行でき、以前のジョブ に依存場合があります。
注
ステージが 1 つでジョブが 1 つしかない場合は、単一ジョブ構文 を使用して、実行する手順を簡単に説明できます。
templateContext
の詳細については、「拡張 YAML パイプライン テンプレート 、ステージ、ジョブ、デプロイのコンテキスト情報を渡す および テンプレートを使用する - templateContext を使用して、のテンプレートにプロパティを渡す」を参照してください。
例示
jobs:
- job: MyJob
displayName: My First Job
continueOnError: true
workspace:
clean: outputs
steps:
- script: echo My first job
こちらもご覧ください
-
uses
の詳細については、「参照先の Azure DevOps リポジトリにジョブ承認スコープを制限するを参照してください。 - クリーン オプションを含むワークスペースの詳細については、「ジョブの ワークスペース」トピックを参照してください。
- 変数 、手順、プール 、サーバー ジョブ について説明します。