Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
Description
Problem
There's an inconsistency between how the Bitbucket Server trigger and Repository Polling trigger works when changing the branch.
When repository polling trigger is enabled and you change the branch on the default repository, Bamboo will trigger a build the next time it polls if there is a difference in commits between previous branch and new branch head.
When using Bitbucket Server trigger, this build does not happen as Bamboo relies on an event from Bitbucket that a change has occurred. Eventually, if Bamboo loses contact with Bitbucket (e.g. when it is restarted) a backup poll will occur and suddenly will build the branch.
The behaviour can be unexpected/not immediately obvious why a build suddenly happened, especially when the branch may have been changed days ago. It would be good to have some alignment between the triggers.
Also, when this happens Bamboo is unable to extract the changes for the build if the head of the new branch is not an ancestor of the previously configured branch/commit of the previous build.
[unknown] Bamboo was unable to extract changes between revision #sha and #sha
Suggested Solution
Some options:
- Bitbucket trigger could perform a build immediately upon changing branches and just use the HEAD commit message for the change reason.
- Bitbucket trigger could perform a build but list a custom trigger reason such as "Branch was changed on the repository configuration".