title | description | ms.date | monikerRange |
---|---|---|---|
steps.task definition |
Runs a task. |
03/02/2023 |
>=azure-pipelines-2019 |
:::moniker range=">=azure-pipelines-2019"
A task
step runs a task.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
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.
:::moniker-end
:::moniker range=">=azure-pipelines-2020 <=azure-pipelines-2020.1"
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.
:::moniker-end
:::moniker range=">=azure-pipelines-2019 <=azure-pipelines-2019.1"
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.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
Definitions that that reference this definition: steps
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
task
string. Required as first property.
Name of the task to run.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
inputs
string dictionary.
Inputs for the task.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
condition
string.
Evaluate this condition expression to determine whether to run this task.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
continueOnError
boolean.
Continue running even on failure?
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
displayName
string.
Human-readable name for the task.
:::moniker-end
:::moniker range=">=azure-pipelines-2020"
target
target.
Environment in which to run this task.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
enabled
boolean.
Run this task when the job runs?
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
env
string dictionary.
Variables to map into the process's environment.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
name
string.
ID of the step. Acceptable values: [-_A-Za-z0-9]*.
:::moniker-end
:::moniker range=">=azure-pipelines-2019"
timeoutInMinutes
string.
Time to wait for this task to complete before the server kills it.
:::moniker-end
:::moniker range=">=azure-pipelines-2022"
retryCountOnTaskFailure
string.
Number of retries if the task fails.
:::moniker-end
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 tasks support a set of common properties in addition to name
and inputs
. For more information on configuring these properties, see Task control options and Task environment variables.
Learn more about conditions, timeouts, and step targets.
steps:
- task: VSBuild@1
displayName: Build
timeoutInMinutes: 120
inputs:
solution: '**\*.sln'