0

As the ADO documenation on using system variables in pipeline conditions is not very clear, I came here to find an answer. But I found two.

condition: eq(variables.buildSourceBranchName, 'main')

and

condition: eq(variables['Build.SourceBranchName'], 'main')

give me the same result. Is there any difference? I so what is that difference?

Mark Chassy
  • 159
  • 3
  • 13
  • Have you looked through these docs? https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#understand-variable-syntax – Yan Sklyarenko Jan 27 '22 at 14:56
  • I did. That sec;tion lists all fo the pre-defined variables and how to use them in a bash or powershell. But there is no indication of the syntax to use to refer to those variables within the YAML. I found the two variations of the syntax described above in answere here on stackoverflow. – Mark Chassy Jan 27 '22 at 17:24

0 Answers0