steps list definition
Steps are a linear sequence of operations that make up a job.
steps: [ step ] #
Properties that use this definition: pipeline.steps, jobs.job.steps
List types
Type | Description |
---|---|
steps.task | Run a task. |
steps.script | The script step is a shortcut for the command-line task, and runs a script using cmd.exe on Windows and Bash on other platforms. |
steps.powershell | The powershell step is a shortcut for the PowerShell task, and runs a script in Windows PowerShell. |
steps.pwsh | The pwsh step is a shortcut for the PowerShell task when that task's pwsh value is set to true, and runs a script in PowerShell Core on Windows, macOS, and Linux. |
steps.bash | The bash step is a shortcut for the shell script task, and runs a script in Bash on Windows, macOS, and Linux. |
steps.checkout | Checkout repositories. |
steps.download | The download step is a shortcut for the Download Pipeline Artifact task, and downloads artifacts associated with the current run or from another Azure pipeline that is associated as a pipeline resource. |
steps.downloadBuild | The download step is a shortcut for the Download Build Artifact task, and downloads build artifacts |
steps.publish | The publish step is a shortcut for the Publish Pipeline Artifact task, and publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume. |
steps.template | Run the steps in a template file for this step. |
steps.restoreCache | The restoreCache step is a shortcut for the Cache task, and restores a cache. |
steps.saveCache | The saveCache step is a shortcut for the Cache task, and saves a cache. |
steps: [ step ] #
Properties that use this definition: pipeline.steps, jobs.job.steps
List types
Type | Description |
---|---|
steps.task | Run a task. |
steps.script | The script step is a shortcut for the command-line task, and runs a script using cmd.exe on Windows and Bash on other platforms. |
steps.powershell | The powershell step is a shortcut for the PowerShell task, and runs a script in Windows PowerShell. |
steps.pwsh | The pwsh step is a shortcut for the PowerShell task when that task's pwsh value is set to true, and runs a script in PowerShell Core on Windows, macOS, and Linux. |
steps.bash | The bash step is a shortcut for the shell script task, and runs a script in Bash on Windows, macOS, and Linux. |
steps.checkout | Checkout repositories. |
steps.download | The download step is a shortcut for the Download Pipeline Artifact task, and downloads artifacts associated with the current run or from another Azure pipeline that is associated as a pipeline resource. |
steps.downloadBuild | The download step is a shortcut for the Download Build Artifact task, and downloads build artifacts |
steps.publish | The publish step is a shortcut for the Publish Pipeline Artifact task, and publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume. |
steps.template | Run the steps in a template file for this step. |
steps.restoreCache | The restoreCache step is a shortcut for the Cache task, and restores a cache. |
steps.saveCache | The saveCache step is a shortcut for the Cache task, and saves a cache. |
steps: [ step ] #
Properties that use this definition: pipeline.steps, jobs.job.steps
List types
Type | Description |
---|---|
steps.task | Run a task. |
steps.script | The script step is a shortcut for the command-line task, and runs a script using cmd.exe on Windows and Bash on other platforms. |
steps.powershell | The powershell step is a shortcut for the PowerShell task, and runs a script in Windows PowerShell. |
steps.pwsh | The pwsh step is a shortcut for the PowerShell task when that task's pwsh value is set to true, and runs a script in PowerShell Core on Windows, macOS, and Linux. |
steps.bash | The bash step is a shortcut for the shell script task, and runs a script in Bash on Windows, macOS, and Linux. |
steps.checkout | Checkout repositories. |
steps.download | The download step is a shortcut for the Download Pipeline Artifact task, and downloads artifacts associated with the current run or from another Azure pipeline that is associated as a pipeline resource. |
steps.downloadBuild | The download step is a shortcut for the Download Build Artifact task, and downloads build artifacts |
steps.getPackage | The getPackage step is a shortcut for the Download Package task, and downloads a package from a package management feed. |
steps.publish | The publish step is a shortcut for the Publish Pipeline Artifact task, and publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume. |
steps.template | Run the steps in a template file for this step. |
steps.restoreCache | The restoreCache step is a shortcut for the Cache task, and restores a cache. |
steps.saveCache | The saveCache step is a shortcut for the Cache task, and saves a cache. |
steps.reviewApp | The reviewApp step is a shortcut for the Review App task. Use this task under deploy phase provider to create a resource dynamically. |
steps: [ step ] #
Properties that use this definition: pipeline.steps, jobs.job.steps
List types
Type | Description |
---|---|
steps.task | Run a task. |
steps.script | The script step is a shortcut for the command-line task, and runs a script using cmd.exe on Windows and Bash on other platforms. |
steps.powershell | The powershell step is a shortcut for the PowerShell task, and runs a script in Windows PowerShell. |
steps.pwsh | The pwsh step is a shortcut for the PowerShell task when that task's pwsh value is set to true, and runs a script in PowerShell Core on Windows, macOS, and Linux. |
steps.bash | The bash step is a shortcut for the shell script task, and runs a script in Bash on Windows, macOS, and Linux. |
steps.checkout | Checkout repositories. |
steps.download | The download step is a shortcut for the Download Pipeline Artifact task, and downloads artifacts associated with the current run or from another Azure pipeline that is associated as a pipeline resource. |
steps.downloadBuild | The download step is a shortcut for the Download Build Artifact task, and downloads build artifacts |
steps.getPackage | The getPackage step is a shortcut for the Download Package task, and downloads a package from a package management feed. |
steps.publish | The publish step is a shortcut for the Publish Pipeline Artifact task, and publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume. |
steps.template | Run the steps in a template file for this step. |
steps.restoreCache | The restoreCache step is a shortcut for the Cache task, and restores a cache. |
steps.saveCache | The saveCache step is a shortcut for the Cache task, and saves a cache. |
steps.reviewApp | The reviewApp step is a shortcut for the Review App task. Use this task under deploy phase provider to create a resource dynamically. |
steps: [ step ] #
Properties that use this definition: pipeline.steps, jobs.job.steps
List types
Type | Description |
---|---|
steps.task | Run a task. |
steps.script | The script step is a shortcut for the command-line task, and runs a script using cmd.exe on Windows and Bash on other platforms. |
steps.powershell | The powershell step is a shortcut for the PowerShell task, and runs a script in Windows PowerShell. |
steps.pwsh | The pwsh step is a shortcut for the PowerShell task when that task's pwsh value is set to true, and runs a script in PowerShell Core on Windows, macOS, and Linux. |
steps.bash | The bash step is a shortcut for the shell script task, and runs a script in Bash on Windows, macOS, and Linux. |
steps.checkout | Checkout repositories. |
steps.download | The download step is a shortcut for the Download Pipeline Artifact task, and downloads artifacts associated with the current run or from another Azure pipeline that is associated as a pipeline resource. |
steps.downloadBuild | The download step is a shortcut for the Download Build Artifact task, and downloads build artifacts |
steps.getPackage | The getPackage step is a shortcut for the Download Package task, and downloads a package from a package management feed. |
steps.publish | The publish step is a shortcut for the Publish Pipeline Artifact task, and publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume. |
steps.template | Run the steps in a template file for this step. |
steps.restoreCache | The restoreCache step is a shortcut for the Cache task, and restores a cache. |
steps.saveCache | The saveCache step is a shortcut for the Cache task, and saves a cache. |
steps.reviewApp | The reviewApp step is a shortcut for the Review App task. Use this task under deploy phase provider to create a resource dynamically. |
steps: [ step ] #
Properties that use this definition: pipeline.steps, jobs.job.steps
List types
Type | Description |
---|---|
steps.task | Run a task. |
steps.script | The script step is a shortcut for the command-line task, and runs a script using cmd.exe on Windows and Bash on other platforms. |
steps.powershell | The powershell step is a shortcut for the PowerShell task, and runs a script in Windows PowerShell. |
steps.pwsh | The pwsh step is a shortcut for the PowerShell task when that task's pwsh value is set to true, and runs a script in PowerShell Core on Windows, macOS, and Linux. |
steps.bash | The bash step is a shortcut for the shell script task, and runs a script in Bash on Windows, macOS, and Linux. |
steps.checkout | Checkout repositories. |
steps.download | The download step is a shortcut for the Download Pipeline Artifact task, and downloads artifacts associated with the current run or from another Azure pipeline that is associated as a pipeline resource. |
steps.downloadBuild | The download step is a shortcut for the Download Build Artifact task, and downloads build artifacts |
steps.getPackage | The getPackage step is a shortcut for the Download Package task, and downloads a package from a package management feed. |
steps.publish | The publish step is a shortcut for the Publish Pipeline Artifact task, and publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume. |
steps.template | Run the steps in a template file for this step. |
steps.restoreCache | The restoreCache step is a shortcut for the Cache task, and restores a cache. |
steps.saveCache | The saveCache step is a shortcut for the Cache task, and saves a cache. |
steps.reviewApp | The reviewApp step is a shortcut for the Review App task. Use this task under deploy phase provider to create a resource dynamically. |
Remarks
Each step runs in its own process on an agent and has access to the pipeline workspace on a local hard drive. This behavior means environment variables aren't preserved between steps but file system changes are.
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.
Examples
steps:
- script: echo This runs in the default shell on any machine
- bash: |
echo This multiline script always runs in Bash.
echo Even on Windows machines!
- pwsh: |
Write-Host "This multiline script always runs in PowerShell Core."
Write-Host "Even on non-Windows machines!"
See also
Feedback
Submit and view feedback for