-
Bug
-
Resolution: Fixed
-
Major
-
Jenkins 2.500
Bitbucket Server Integration 4.1.4
Bitbucket Data Center 8.19.16 LTS
After upgrading the Bitbucket Server Integration plugin from 4.0.0 to 4.1.4, pull requests started to fail on Multibranch Pipeline jobs.
The error indicates that Jenkins cannot find the corresponding commit:
13:31:06 ERROR: Checkout failed
13:31:06 hudson.plugins.git.GitException: Command "git checkout -f b47595c059dfdd52e85ed638914892c06a9a425e" returned status code 128:
13:31:06 stdout:
13:31:06 stderr: fatal: reference is not a tree: b47595c059dfdd52e85ed638914892c06a9a425e
Reverting to Bitbucket Server Integration 4.0.0 resolves the problem.
I compared build logs from both versions of the plugin. When the older version (4.0.0) is used, the PR refspec gets added to the fetch command:
git fetch --no-tags --force --progress – REDACTED.git +refs/heads/:refs/remotes/origin/ +refs/pull-requests/39/from:refs/remotes/origin/PR-39
However, this is not present with the newer version of the plugin:
git fetch --no-tags --force --progress – REDACTED.git +refs/heads/:refs/remotes/origin/
So the subsequent checkout cannot find the reference.