What are the Azure DevOps System Variables?

Get introduced to the Azure DevOps system variables.

We'll cover the following

Azure DevOps comes with a lot of system variables that can provide useful information to your pipelines.

Useful system variables

A quick list of useful system variables is below.

Variable Name Variable Description
Agent.Name The name of the agent that is registered with the pool

If you are using a self-hosted agent, this name is specified by you. This variable is useful when using on-premise agents.
Agent.OS The operating system of the agent host
Build.BuildNumber The name of the completed build, also known as the run number
Build.SourceBranch The branch of the triggering repo the build was queued for
System.DefaultWorkingDirectory The local path on the agent where your source code files are downloaded
Common.TestResultsDirectory The local path on the agent where the test results are created
Agent.MachineName The name of the machine on which the agent is installed.
Agent.JobStatus The status of the build.
System.AccessToken A special variable that carries the security token used by the running build
System.Debug Set this variable to true for debugging pipeline issues.

For the complete list, please refer to this link.

Get hands-on with 1400+ tech skills courses.