title | description | ms.date | monikerRange |
---|---|---|---|
steps definition |
Steps are a linear sequence of operations that make up a job. |
10/04/2024 |
>=azure-pipelines-2019 |
:::moniker range=">=azure-pipelines-2019"
Steps are a linear sequence of operations that make up a job.
:::moniker-end
:::moniker range=">=azure-pipelines-2020"
steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | getPackage | publish | template | reviewApp ] # Steps are a linear sequence of operations that make up a job.
:::moniker-end
:::moniker range=">=azure-pipelines-2019 <=azure-pipelines-2019.1"
steps: [ task | script | powershell | pwsh | bash | checkout | download | downloadBuild | publish | template ] # Steps are a linear sequence of operations that make up a job.
:::moniker-end
:::moniker range=">=azure-pipelines-2020"
Definitions that reference this definition: pipeline, jobs.job, preDeployHook, deployHook, routeTrafficHook, postRouteTrafficHook, onFailureHook, onSuccessHook
:::moniker-end
:::moniker range=">=azure-pipelines-2019 <=azure-pipelines-2019.1"
Definitions that reference this definition: pipeline, jobs.job
:::moniker-end
:::moniker range=">=azure-pipelines-2020"
Type | Description |
---|---|
steps.task | Runs a task. |
steps.script | Runs a script using cmd.exe on Windows and Bash on other platforms. |
steps.powershell | Runs a script using either Windows PowerShell (on Windows) or pwsh (Linux and macOS). |
steps.pwsh | Runs a script in PowerShell Core on Windows, macOS, and Linux. |
steps.bash | Runs a script in Bash on Windows, macOS, and Linux. |
steps.checkout | Configure how the pipeline checks out source code. |
steps.download | Downloads artifacts associated with the current run or from another Azure Pipeline that is associated as a pipeline resource. |
steps.downloadBuild | Downloads build artifacts. |
steps.getPackage | Downloads a package from a package management feed in Azure Artifacts or Azure DevOps Server. |
steps.publish | Publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume. |
steps.template | Define a set of steps in one file and use it multiple times in another file. |
steps.reviewApp | Downloads creates a resource dynamically under a deploy phase provider. |
:::moniker-end
:::moniker range=">=azure-pipelines-2019 <=azure-pipelines-2019.1"
Type | Description |
---|---|
steps.task | Runs a task. |
steps.script | Runs a script using cmd.exe on Windows and Bash on other platforms. |
steps.powershell | Runs a script using either Windows PowerShell (on Windows) or pwsh (Linux and macOS). |
steps.pwsh | Runs a script in PowerShell Core on Windows, macOS, and Linux. |
steps.bash | Runs a script in Bash on Windows, macOS, and Linux. |
steps.checkout | Configure how the pipeline checks out source code. |
steps.download | Downloads artifacts associated with the current run or from another Azure Pipeline that is associated as a pipeline resource. |
steps.downloadBuild | Downloads build artifacts. |
steps.publish | Publishes (uploads) a file or folder as a pipeline artifact that other jobs and pipelines can consume. |
steps.template | Define a set of steps in one file and use it multiple times in another file. |
:::moniker-end
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 tasks and steps support a set of common properties, such as enabled
and env
,in addition to their task or step specific properties. For more information on configuring these properties, see Task control options and Task environment variables.
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!"