Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A task
step runs a task.
All tasks support the following set of common properties.
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.
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.
Definitions that reference this definition: steps
Properties
task
string. Required as first property.
Name of the task to run.
inputs
string dictionary.
Inputs for the task.
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.
enabled
boolean.
Run this task when the job runs?
env
string dictionary.
Variables to map into the process's environment.
name
string.
ID of the step. Acceptable values: [-_A-Za-z0-9]*.
timeoutInMinutes
string.
Time to wait for this task to complete before the server kills it. For example, to configure a 10 minute timeout, use timeoutInMinutes: 10
.
Note
Pipelines may be configured with a job level timeout. If the job level timeout interval elapses before your step completes, the running job (including your step) is terminated, even if the step is configured with a longer timeoutInMinutes
interval. For more information, see Timeouts.
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'
Common task properties
All tasks support a set of common properties in addition to name
and inputs
. For a list of common task properties, see the preceding Properties section. For more information on configuring these properties, see Task control options and Task environment variables.
Learn more about conditions, timeouts, and step targets.
Examples
steps:
- task: VSBuild@1
displayName: Build
timeoutInMinutes: 120
inputs:
solution: '**\*.sln'