In Azure DevOps, I can organize build definitions inside folders. Is it possible to access the build definition’s logical path? I’d like to copy build artifacts to a file share and have it part of the destination directory.
I checked the documentation but I couldn’t find anything beyond Build.DefinitionName
which doesn’t include the path I expected it to.
eg. I have a build definition called ConsoleApp inside a Utilities folder. Within the build definition, there is a copy task which copies the build output to //networkstore.local/Builds/$(Build.DefinitionName)/$(Build.BuildNumber)
. This returns a path of .../Builds/ConsoleApp/1
but I want .../Builds/Utilities/ConsoleApp/1
.
I realize I could hardcode the path into the copy task, but it wouldn’t update if the build definition was moved/cloned elsewhere/etc.