Our project repository is on Bitbucket Cloud. We are building using Azure Pipelines. Our triggers in the pipeline are set up in this fashion:
trigger:
- '*'
pr:
- develop
- develop/*
- master/*
- feature/*
- release_*
CI builds are triggered on every commit, as expected. PR builds are triggered when PRs are created or updated, but not when merged. We note that this is expected behavior for Bitbucket Cloud, per the Azure Devops documentation (emphasis is mine):
Each new run builds the latest commit from the source branch of the pull request. This is different from how Azure Pipelines builds pull requests in other repositories (e.g., Azure Repos or GitHub), where it builds the merge commit. Unfortunately, Bitbucket does not expose information about the merge commit, which contains the merged code between the source and target branches of the pull request.
That is, a PR build is triggered when a PR is created or updated, but not on a merge commit.
That is indeed unfortunate. To correct this deficiency requires some cooperation between Microsoft and Atlassian. Is either party working on a solution? If not, is there a kludge or workaround we can use instead?
EDITED TO ADD: This is not intended as a flame or a complaint. BB Cloud is great. I'm just trying to find a way to make this work.