Community
Participate
Working Groups
Created attachment 241238 [details] screenshot of git plugin settings It appears that when 'merge before build' is selected, it works one time, then fails thereafter because it does not account for having already created the branch ref. Please see screenshot and stacktrace below. Started by an SCM change Checkout:workspace / /opt/hudson/jobs/blerp-f123-v3/workspace - hudson.remoting.LocalChannel@3a87a05d Using strategy: Default Last Built Revision: Revision 567af2ed4e19ce55d8026d2224c3c10ffe95cee4 (origin/topic/feature123) Checkout:workspace / /opt/hudson/jobs/blerp-f123-v3/workspace - hudson.remoting.LocalChannel@3a87a05d Fetching changes from the remote Git repository Fetching upstream changes from git@github.com:carltonbrown/blerp.git Commencing build of Revision d3658377f12bef69b249180ec7b31e056e3c0d35 (origin/topic/feature123) Merging Revision d3658377f12bef69b249180ec7b31e056e3c0d35 (origin/topic/feature123) onto develop FATAL: Could not checkout develop with start point de8985988cdc92fda12126cdbde173d5f6ddc155 hudson.plugins.git.GitException: Could not checkout develop with start point de8985988cdc92fda12126cdbde173d5f6ddc155 at hudson.plugins.git.GitAPI.checkoutBranch(GitAPI.java:836) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:908) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:890) at hudson.FilePath.act(FilePath.java:793) at hudson.FilePath.act(FilePath.java:775) at hudson.plugins.git.GitSCM.getMergedBuildConfig(GitSCM.java:890) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:759) at hudson.model.AbstractProject.checkout(AbstractProject.java:1548) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:607) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:518) at hudson.model.Run.run(Run.java:1450) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44) at hudson.model.ResourceController.execute(ResourceController.java:82) at hudson.model.Executor.run(Executor.java:137) Caused by: org.eclipse.jgit.api.errors.RefAlreadyExistsException: Ref develop already exists at org.eclipse.jgit.api.CreateBranchCommand.call(CreateBranchCommand.java:133) at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:216) at hudson.plugins.git.GitAPI.checkoutBranch(GitAPI.java:828) ... 13 more