Obtener el nombre de la rama de la tubería de Azure
$branchSource = "$(Build.SourceBranch)" #this is "refs/heads/YourBranch"
$branchSourcePath = $branchSource -replace "refs/heads/", "" #this is "YourBranch"
Clément Bazin