1
votes

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
Why not set the system.debug = true in the build definition? now each build by default will be true. - Shayki Abramczyk
1. That is not the point of the question. 2. I do not want each build to publish it diagnostics, because it takes time to generate them and time is of the essence for Gated Check-In, excuse me, PR validation builds - mark
A quick reminder, Mark, that we prefer questions to be succinct and free of chat here. I recall I have edited your questions before to remove soliloquies about your appreciation - please try to refrain from it. The best politeness on Stack Overflow is to upvote and accept material that deserves it. - halfer

1 Answers

1
votes

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