Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-48942

Checkout with PreMerge leads to "Reference is not a tree" error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • 2.89.2

      We are using Bitbucket and pull-request-notifier-for-Bitbucket to notify jenkins of pull request.
      Jenkins uses the git-plugin to do a premerge of the specific branch into master.

      If a new pr is opened the premerge and build works fine. But if the build failes and pull request is triggered a second time the error "reference is not a tree" occurs. 

      After debugging the git plugin for some time I found out that the Build.xml is saves already build branches/revisions and therefore skips the merge part, which leads to the error.

      data represents the BuildData from the previous build.xml. 

      After creating a new project and creating a pull request, I've noticed that the error does not occur. After debugging both projects I've come to the conclusion, that the build.xml is identical but the new project only extracts the first occurance of BuildData, while the failing project uses all occurances. 

      Failing project: all returns all occurances of BuildData

      Successful project: return first occurance of BuildData

       Why is build.getActions returning different results?

      The current Workaround includes modifing the git plugin in a way that it does not remove already build revisions.

            Unassigned Unassigned
            kerschy Patrick Kerschbaumer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: