There could be requirement to get Azure DevOps build definition location when developing scripts to use with Azure DevOps. In such script, you can hardcode build definition location or use recently introduced pre-defined system variable, Build.DefinitionFolderPath in Azure DevOps.
Pre requirement: Azure DevOps build definition
The build definition we use for this blog post is under Demo Build Pipeline.