I've been trying out Bamboo OnDemand to get a sense for how automatic branch merging works, but I haven't been able to get it to ever work correctly. I made a simple repo on Bitbucket, put a simple maven prototype project into it and got it built. Then, I checked a simple failing test in called testBreaksInFeature into a branch called feature. I checked in an extra comment to master. The feature branch's build started failing in Bamboo, as expected, and the master branch did not. All good so far.
Next, I turned on branch merging, using Gatekeeper, and ran the build again. This time, to my surprise the build worked: no failing test. I logged into the elastic instance, sudo'ed up, and found the working directory for the job. Weirdly, git status revealed that the current branch was feature, and the staged changes in the directory were a deletion of the new test in the feature branch plus the addition of the comment from master. In other words, rather than being a merge from feature to master, it was a changeset that just turned feature into what master already had.
I was trying to figure out what was going on, so I replaced /usr/bin/git with a script that would log every call to git and then pass through to the real git. I found that Bamboo was calling the following sequence of commands:
I set the elastic instance to have a git capability of /usr/bin/git
That's correct. Update on Monday will add that capabilty be default.
Is Bamboo somehow using a combination of command line git and JGit in a way that's screwing up?
Possibly. I think it's best if you contacted support, we will be able to figure out what's happening there.
Glad to hear that the Git capability will be default; it was really, really confusing to figure out what was wrong with branch merging at first (with Github the error message was something like "Error merging branch: null", while with Bitbucket there was at least a stack trace, although it was not super helpful).
I opened a support ticket for the issue as you suggested: JST-42618 .
Worth noting that this feature works better, but not perfectly with Mercurial. Gatekeeper seems to work correctly with branch merging (hooray!), but for some reason, merging back to master on a clean feature branch build gives "Failure Reason Exception during push: null" (boo!).
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
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...
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!
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