Mohd Abdul Mujib
Mohd Abdul Mujib

Reputation: 13928

How to get source branch name in Azure Build Validation

So I'm trying my hands out on Azure Pipelines, and I'm looking at the Build Validation, Here 've specified a pipeline to execute whenever a PR is created using the YAML method.

Now my question is how do I get/grab the name of the source branch so that I can deploy that for validating it against the test cases?

Upvotes: 2

Views: 2861

Answers (1)

Shamrai Aleksander
Shamrai Aleksander

Reputation: 16058

If you want to find a source branch during the build process, you can use the predefined variable System.PullRequest.SourceBranch (System variables (DevOps Services)). How to use variables, you can find here: Define variables.

Upvotes: 3

Related Questions