Closed OlavStornes closed 3 years ago
Hi Olav,
when running as part of a pull request validation build, BQC uses the following logic if configured to compare with the previous build:
refs/pull/{PR ID}/merge
. Naturally, it won't find a build for the very first build run for a PR.System.PullRequest.TargetBranch
variable), it automatically tries to find a suceeded build that ran for the PR target branch and uses that as a baseline.baseBranchRef
that doesn't match the source branch, BQC looks for a succeeded build that ran for the given branch.According to your log, BQC neither fell back on the PR target branch (there would have been a log message for that), nor did it find a baseline build. Are you sure that
main
branch, andIf you are using different build definitions for PR builds and CI builds, you also have to specify the baseDefinitionId
parameter.
Hi Rene,
After digging around, i figured i had multiple pipeline builds, which threw me off guard.
The solution was to set baseDefinitionId
to my projects pipeline build ID when running a PR. Now it fails successfully!
Thank you for replying and your assistance.
Greetings! When i attempt to set this up for checking code coverage in context of pull requests, I seem to have issues regarding
No baseline found
. In my case a branch with only 20 % covered is seen as valid when compared to the target branch, which has <70 % covered.I've also added
bqc/coverage-policy
on the main branch as a status check, but this does not seem to trigger either. I have attempted to go through the documentation regarding pull requests and task parameters, but i still seem to have issues.Is there something obvious i have missed?
Best regards, OlavStornes
Extra
Snippet of the PR-setup:
Log output: