DEV Community

Discussion on: Understanding the directory structure created by Azure DevOps tasks.

Collapse
 
jessekphillips profile image
Jesse Phillips

The one I needed was: Agent.BuildDirectory
https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml

Here is a table that is what I was looking for, note that I'm going to change your use of /a to represent the agent working directory and instead anchor it to / noting that it technically could be anywhere.

Directory Uses Variable Task Magic
/ This is the working director for agent Agent.WorkFolder
/1 This is the working director for agent Agent.BuildDirectory Dowloaded Artifacts Are placed here
/1/a Artifact staging directory. This is where the VS Build task results are stored in. Note - it gets purged before each new build. Build.StagingDirectory, System.ArtifactsDirectory, Build.ArtifactStagingDirectory The publish build artifacts task creates an artifact of whatever is in this folder.
/1/b The output folder for compiled binaries. Build.BinariesDirectory
/1/s Source directory. This is where your source code is stored. Build.SourcesDirectory, System.DefaultWorkingDirectory This is the Working Directory for your tasks