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

NPE on PreBuildMerge.decorateRevisionToBuild

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Fixed
    • git-plugin
    • None
    • core 1.642.4.2
      git:2.4.2 'Jenkins Git plugin'
      git-client:1.19.5 'Jenkins Git client plugin'
      Git for Windows 2.8.1
      Gitolite v3.6.3

    Description

      I detect that a return null form GitSCM.getBuildData is not checked into PreBuildMerge.decorateRevisionToBuild

       > C:\Git\bin\git.exe rev-parse "oppp/R362537^{commit}" # timeout=10
       > C:\Git\bin\git.exe config core.sparsecheckout # timeout=10
       > C:\Git\bin\git.exe checkout -f oppp/R362537
       > C:\Git\bin\git.exe merge --ff 6e11aa436022222222222229f13d9b13d73551b2 # timeout=10
       > C:\Git\bin\git.exe config core.sparsecheckout # timeout=10
       > C:\Git\bin\git.exe checkout -f 6e11aa4362222222222229b04f13d9b13d73551b2
      FATAL: null
      java.lang.NullPointerException
      	at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:88)
      	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:965)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1054)
      	at hudson.scm.SCM.checkout(SCM.java:485)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      	at hudson.model.Run.execute(Run.java:1738)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Recording test results
      

      Attachments

        Issue Links

          Activity

            I encountered the same issue, with branches which merge works fine. I solved it by using JGit instead of Git Client

            geoffroya Geoffroy ARNOUD added a comment - I encountered the same issue, with branches which merge works fine. I solved it by using JGit instead of Git Client

            Code changed in jenkins
            User: Ivan Fernandez Calvo
            Path:
            src/main/java/hudson/plugins/git/extensions/impl/PreBuildMerge.java
            http://jenkins-ci.org/commit/git-plugin/11f792c756a6f030355df73932ccde99a9057146
            Log:
            JENKINS-34369 protect against a NPE form GitSCM.getBuildData is not checked into PreBuildMerge.decorateRevisionToBuild

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ivan Fernandez Calvo Path: src/main/java/hudson/plugins/git/extensions/impl/PreBuildMerge.java http://jenkins-ci.org/commit/git-plugin/11f792c756a6f030355df73932ccde99a9057146 Log: JENKINS-34369 protect against a NPE form GitSCM.getBuildData is not checked into PreBuildMerge.decorateRevisionToBuild

            Code changed in jenkins
            User: Mark Waite
            Path:
            src/main/java/hudson/plugins/git/extensions/impl/PreBuildMerge.java
            http://jenkins-ci.org/commit/git-plugin/2025127d7e82cc61b0b8f6ede91997c28bfd3c3d
            Log:
            Merge pull request #394 from kuisathaverat/JENKINS-34369

            JENKINS-34369 protect against a NPE form GitSCM.getBuildData

            Compare: https://github.com/jenkinsci/git-plugin/compare/fcbdc768536c...2025127d7e82

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/hudson/plugins/git/extensions/impl/PreBuildMerge.java http://jenkins-ci.org/commit/git-plugin/2025127d7e82cc61b0b8f6ede91997c28bfd3c3d Log: Merge pull request #394 from kuisathaverat/ JENKINS-34369 JENKINS-34369 protect against a NPE form GitSCM.getBuildData Compare: https://github.com/jenkinsci/git-plugin/compare/fcbdc768536c...2025127d7e82

            Ready for Release

            ifernandezcalvo Ivan Fernandez Calvo added a comment - Ready for Release
            markewaite Mark Waite added a comment -

            Released in git plugin 3.0.1, 18 Nov 2016

            markewaite Mark Waite added a comment - Released in git plugin 3.0.1, 18 Nov 2016

            People

              ifernandezcalvo Ivan Fernandez Calvo
              ifernandezcalvo Ivan Fernandez Calvo
              Votes:
              4 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: