12

What is the meaning of the last letter "a", "b", or "s" in Azure DevOps' directory structure:

C:\agent_work\1\a C:\agent_work\1\b C:\agent_work\1\s

Anyone know what that last letter stands for?

Extra credit: what's the "1" represent too?

Glenn
  • 175
  • 1
  • 7
  • Always assumed it was just a random folder name that’s auto created to store build assets and artifacts. – Matt Jun 01 '20 at 19:55
  • Please check: [Azure DevOps - During the build pipeline run, what is the path where the Agent downloads the files locally?](https://stackoverflow.com/a/70972296/1176573) – Rajesh Swarnkar Nov 02 '22 at 10:41

1 Answers1

22

Check out the predefined variables:

\a likely stands for "artifacts"

Build.ArtifactStagingDirectory - The local path on the agent where any artifacts are copied to before being pushed to their destination. For example: c:\agent_work\1\a

\b likely stands for "binaries"

Build.BinariesDirectory - The local path on the agent you can use as an output folder for compiled binaries. For example: c:\agent_work\1\b.

\s likely stands for "sources"

Build.Repository.LocalPath - The local path on the agent where your source code files are downloaded. For example: c:\agent_work\1\s. This variable is synonymous with Build.SourcesDirectory.

On Hosted build agents "1" seems to be static, on a self hosted agent I have noticed this number is unique per pipeline.

Simon Ness
  • 2,272
  • 22
  • 28
  • 2
    I suspect Microsoft made the directory names as short as possible so they would avoid the 256 character path+filename limit that exists on some of their operating system platforms. Nevertheless, knowing what "a", "b", and "s" stand for really helps my understanding of what files I should be expecting where. Thanks so much, Simon! – Glenn Jun 02 '20 at 19:31