steps.task の定義
task
ステップでタスクが実行されます。
すべてのタスクで、次の一連の共通プロパティがサポートされます。
steps:
- task: string # Required as first property. Name of the task to run.
inputs: # Inputs for the task.
string: string # Name/value pairs
condition: string # Evaluate this condition expression to determine whether to run this task.
continueOnError: boolean # Continue running even on failure?
displayName: string # Human-readable name for the task.
target: string | target # Environment in which to run this task.
enabled: boolean # Run this task when the job runs?
env: # Variables to map into the process's environment.
string: string # Name/value pairs
name: string # ID of the step.
timeoutInMinutes: string # Time to wait for this task to complete before the server kills it.
retryCountOnTaskFailure: string # Number of retries if the task fails.
steps:
- task: string # Required as first property. Name of the task to run.
inputs: # Inputs for the task.
string: string # Name/value pairs
condition: string # Evaluate this condition expression to determine whether to run this task.
continueOnError: boolean # Continue running even on failure?
displayName: string # Human-readable name for the task.
target: string | target # Environment in which to run this task.
enabled: boolean # Run this task when the job runs?
env: # Variables to map into the process's environment.
string: string # Name/value pairs
name: string # ID of the step.
timeoutInMinutes: string # Time to wait for this task to complete before the server kills it.
この定義を参照する定義: 手順
特性
task
文字列。 最初のプロパティとして必要です。
実行するタスクの名前。
文字列ディクショナリ inputs
します。
タスクの入力を します。
condition
文字列。
この条件式を評価して、このタスクを実行するかどうかを決定します。
ブールを
障害が発生しても実行を続行しますか?
displayName
文字列。
タスクの人間が判読できる名前を します。
ターゲットを target
します。
このタスクを実行する環境です。
ブールを
ジョブの実行時にこのタスクを実行しますか?
文字列ディクショナリ env
します。
変数を使用して、プロセスの環境にマップします。
name
文字列。
ステップの ID。 使用できる値: [-_A-Za-z0-9]*。
timeoutInMinutes
文字列。
このタスクが完了するまで待機してから、サーバーによって強制終了されるまでの時間を指定します。 たとえば、10 分間のタイムアウトを構成するには、timeoutInMinutes: 10
を使用します。
注
パイプラインは、ジョブ レベルのタイムアウトで構成できます。 ステップが完了する前にジョブ レベルのタイムアウト間隔が経過すると、ステップが長い timeoutInMinutes
間隔で構成されている場合でも、実行中のジョブ (ステップを含む) が終了します。 詳細については、「タイムアウト」を参照してください。
retryCountOnTaskFailure
文字列。
タスクが失敗した場合の再試行回数。 Azure DevOps Server 2022、2022.1、および 2022.2 では、再試行はエージェント ジョブでのみサポートされます。 詳細については、「Azure DevOps サービス更新プログラム 2021 年 11 月 16 日 - タスク の自動再試行と Azure DevOps サービス更新プログラムの 2025 年 6 月 14 日 - サーバー タスクの再試行を参照してください。
注釈
タスク は、パイプラインの構成要素です。 タスクの カタログ 選択できます。
コマンド モードを指定しない場合は、target
構造を次のように短縮できます。
- task:
target: string # container name or the word 'host'
一般的なタスクプロパティ
すべてのタスクは、name
と inputs
に加えて、一連の共通プロパティをサポートします。 一般的なタスク プロパティの一覧については、前述の「プロパティの」セクションを参照してください。 これらのプロパティの構成の詳細については、「タスクコントロールオプション およびタスク環境変数 を参照してください。
条件の、タイムアウト、およびステップ ターゲット 詳細について説明します。
例示
steps:
- task: VSBuild@1
displayName: Build
timeoutInMinutes: 120
inputs:
solution: '**\*.sln'