Details
-
Bug
-
Resolution: Done
-
High
-
5.14.0.1, 5.14.0.2
-
Severity 2 - Major
-
Description
Summary
Pushes from Bamboo when using Gatekeeper have been failing
Steps to Reproduce
- Create a Build Plan with Gatekeeper enabled
- Run a build that should push to your gatekeeper branch
Expected Results
The push completes successfully and the build continues.
Actual Results
The below exception is thrown in the atlassian-bamboo.log file:
2016-11-01 17:19:01,829 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [ChainExecutionManagerImpl] Failed to push for plan-result: [BRANCH KEY]. Exception during push: Can't guess branch name for revision [ref hash] when trying to perform push.
With DEBUG logging enabled for com.atlassian.bamboo.plugins.git.GitCommandProcessor, the below will appear:
2016-11-01 17:19:01,380 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [GitCommandProcessor] Running in [workingDirectory]/mergeWorkspace: [/usr/bin/git log -1 --encoding=UTF-8 --format=%H MERGE_HEAD] 2016-11-01 17:19:01,380 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [GitCommandBuilder] {SSH_ASKPASS=/bin/echo} 2016-11-01 17:19:01,488 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [GitCommandProcessor] Running in [workingDirectory]/mergeWorkspace: [/usr/bin/git status --porcelain --untracked-files=no] 2016-11-01 17:19:01,488 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [GitCommandBuilder] {SSH_ASKPASS=/bin/echo} 2016-11-01 17:19:01,597 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [GitCommandProcessor] git status output: 2016-11-01 17:19:01,597 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [NativeGitOperationHelper] Nothing to commit 2016-11-01 17:19:01,597 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [GitCommandProcessor] Running in [workingDirectory]/mergeWorkspace: [/usr/bin/git log -1 --encoding=UTF-8 --format=%H HEAD] 2016-11-01 17:19:01,597 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [GitCommandBuilder] {SSH_ASKPASS=/bin/echo} 2016-11-01 17:19:01,718 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [GitCommandProcessor] Running in [workingDirectory]/mergeWorkspace: [/usr/bin/git show-ref master] 2016-11-01 17:19:01,718 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [GitCommandBuilder] {SSH_ASKPASS=/bin/echo} 2016-11-01 17:19:01,825 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [GitCommandProcessor] --- Full output: --- 2016-11-01 17:19:01,825 DEBUG [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-8] [GitCommandProcessor] --- End of output: ---
The following appears in the job log:
simple 01-Nov-2016 17:18:58 Note: checking out '[ref hash]'. simple 01-Nov-2016 17:18:58 simple 01-Nov-2016 17:18:58 You are in 'detached HEAD' state. You can look around, make experimental simple 01-Nov-2016 17:18:58 changes and commit them, and you can discard any commits you make in this simple 01-Nov-2016 17:18:58 state without impacting any branches by performing another checkout. simple 01-Nov-2016 17:18:58 simple 01-Nov-2016 17:18:58 If you want to create a new branch to retain commits you create, you may simple 01-Nov-2016 17:18:58 do so (now or later) by using -b with the checkout command again. Example: simple 01-Nov-2016 17:18:58 simple 01-Nov-2016 17:18:58 git checkout -b <new-branch-name>
Workaround
- Stop Bamboo
- Copy off the <bamboo-install>/atlassian-bamboo/WEB-INF/lib/atlassian-bamboo-core-5.13.2.jar
- Place the atlassian-bamboo-core-5.14.0.2.jar attach to this case in it's place
- Start Bamboo