How to trigger TFS vNext Pull Request validation build with a non default parameter value?

154 views Asked by At

Our branch policy specifies a PR validation build. That build publishes the diagnostics binary log when system.debug is true.

But the default value for this parameter is false. In XAML builds we could trigger the Gated Check-In build with explicit shelveset and override the defaults for build parameters. But I cannot see how can one do it in vNext builds for a Pull Request.

EDIT 1

I do not want the binary log to be generated by default. The use case is when somebody's PR build fails and the reason for the failure is not immediately obvious from the build log. That is when I would like to be able to requeue the validation build with system.debug = true

1

There are 1 answers

3
Shayki Abramczyk On

I don't know if it possible out of the box, but you have a simple workaround.

Add a PowerShell task in the at the beginning of the build that set the variable system.debug to true:

Write-Host "##vso[task.setvariable variable=system.debug]true"

In the custom conditions specify that this task will be executed only in PR:

eq(variables['Build.Reason'], 'PullRequest')

enter image description here

enter image description here