Bamboo's Gatekeeper configuration failing to push back to Stash

We have a Bamboo build for the "master" branch of a repository on Stash. This build also has a "dmz" branch, and this branch is configured as a Gatekeeper, merging the build on master and then pushing back the results.

This has worked for a while (last successful build as number 137), and then it stopped working. Now, after the whole build was successful, I get this message:

Exception during push: Can't guess branch name for revision 4c07ec6d09b292aa8a808bff7f0b07c0ef20edcb when trying to perform push.

With the revision number changing from build to build, as people push things into dmz.

I haven't seen anything in the logs -- either Stash or Bamboo -- related to this error. On Stash, there's no indication that Bamboo ever tried to push anything. There are calls to the build status API, but no push. On Bamboo, the build log stops before this operation is done, so there's no trace of it.

3 answers

Hi Daniel,

This is a Bamboo/Gatekeeper problem, it hasn't tried to push yet.

I don't quite understand what the problem is, but the error is happening in this plugin (in NativeGitOperationHelper.java)

https://bitbucket.org/atlassian/bamboo-git-plugin

At a glance I'm assuming it worked before because it may have been a fast-forward merge, and the 'getPossibleBranchNameForCheckout()' method would have been able to 'guess' the branch. I'm assuming since your last successful build there has been a direct change on master and now it's having to do a normal merge between dms and master, which has created a new commit. That's just a guess mind you.

I'll try to ping one of the Bamboo people to see if they can give you more assistance.

Cheers,

Charles

Actually, all merges to master are fast forward, because the branch is protected to the bamboo user, and bamboo only updates through this process. I have also confirmed that, indeed, dmz can be merged by fast forward to master.

The problem disappeared after we removed the build directories, and let Bamboo recreate them.

Hi Daniel,

Glad to hear you managed to fix the build. My guess was obviously way off. I'll stay out of it.

Charles

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,096 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot