steps.task definition

A task step runs a task.

steps:
- task

Properties that use this definition: steps

Properties

step

task


steps:
- task

Properties that use this definition: steps

Properties

step

task


steps:
- task

Properties that use this definition: steps

Properties

step

task


steps:
- task

Properties that use this definition: steps

Properties

step

task


steps:
- task

Properties that use this definition: steps

Properties

step

task


Remarks

Tasks are the building blocks of a pipeline. There's a catalog of tasks available to choose from.

If you don't specify a command mode, you can shorten the target structure to:

- task:
  target: string  # container name or the word 'host'

All steps and tasks support the following properties in addition to their task or step specific properties.

  condition: string # Evaluate this condition expression to determine whether to run this task. 
  continueOnError: boolean # Continue running even on failure?.  (false,n,no,off,on,true,y,yes)
  displayName: string # Human-readable name for the task. 
  target: # Environment in which to run this task
  enabled: boolean # Run this task when the job runs? (false,n,no,off,on,true,y,yes)
  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. 
  condition: string # Evaluate this condition expression to determine whether to run this task. 
  continueOnError: boolean # Continue running even on failure?.  (false,n,no,off,on,true,y,yes)
  displayName: string # Human-readable name for the task. 
  target: # Environment in which to run this task
  enabled: boolean # Run this task when the job runs? (false,n,no,off,on,true,y,yes)
  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. 
  condition: string # Evaluate this condition expression to determine whether to run this task. 
  continueOnError: boolean # Continue running even on failure?.  (false,n,no,off,on,true,y,yes)
  displayName: string # Human-readable name for the step. 
  enabled: boolean # Run this task when the job runs? (false,n,no,off,on,true,y,yes)
  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. 

Learn more about conditions, timeouts, and step targets.

Examples

steps:
- task: VSBuild@1
  displayName: Build
  timeoutInMinutes: 120
  inputs:
    solution: '**\*.sln'

See also