• 4.5.0

      I have configured a job to verify Gerrit changes, but it fails with NPE. Here's the log:

      Triggered by Gerrit: http://jerry:3881/104
      Building in workspace /var/lib/tomcat/.jenkins/workspace/gerrit-sdm-backend
      Cloning the remote Git repository
      Cloning repository http://jerry:3881/sdm/sdm-backend
       > git init /var/lib/tomcat/.jenkins/workspace/gerrit-sdm-backend # timeout=10
      Fetching upstream changes from http://jerry:3881/sdm/sdm-backend
       > git --version # timeout=10
       > git -c core.askpass=true fetch --tags --progress http://jerry:3881/sdm/sdm-backend +refs/heads/*:refs/remotes/origin/*
       > git config remote.origin.url http://jerry:3881/sdm/sdm-backend # timeout=10
       > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
       > git config remote.origin.url http://jerry:3881/sdm/sdm-backend # timeout=10
      Fetching upstream changes from http://jerry:3881/sdm/sdm-backend
       > git -c core.askpass=true fetch --tags --progress http://jerry:3881/sdm/sdm-backend refs/changes/04/104/3
       > git rev-parse 14428cdafcdc87c4f6b3fdd87ad1344d3cd8be33^{commit} # timeout=10
      Checking out Revision 14428cdafcdc87c4f6b3fdd87ad1344d3cd8be33 ()
       > git config core.sparsecheckout # timeout=10
       > git checkout -f 14428cdafcdc87c4f6b3fdd87ad1344d3cd8be33
      FATAL: null
      java.lang.NullPointerException
      	at java.util.TreeMap.compare(TreeMap.java:1188)
      	at java.util.TreeMap.put(TreeMap.java:531)
      	at hudson.util.CopyOnWriteMap.put(CopyOnWriteMap.java:104)
      	at hudson.plugins.git.GitTagAction.<init>(GitTagAction.java:44)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1066)
      	at hudson.scm.SCM.checkout(SCM.java:485)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
      	at hudson.model.Run.execute(Run.java:1741)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:408)
      Finished: FAILURE
      

      git version 2.5.3

          [JENKINS-30844] NPE on Gerrit job

          Mark Waite added a comment -

          Can you describe the job configuration, the steps necessary to duplicate the problem, and the version numbers of the various plugins involved in seeing the problem?

          For example, I assume you must have added the Additional Behaviour to tag every build. Are there other behaviors you added which might be interacting with this? Does the failure occur even without involving Gerrit (since the stack trace looks like it is purely a git plugin stack trace, not involving anything with Gerrit).

          Mark Waite added a comment - Can you describe the job configuration, the steps necessary to duplicate the problem, and the version numbers of the various plugins involved in seeing the problem? For example, I assume you must have added the Additional Behaviour to tag every build. Are there other behaviors you added which might be interacting with this? Does the failure occur even without involving Gerrit (since the stack trace looks like it is purely a git plugin stack trace, not involving anything with Gerrit).

          Gerrit Trigger - 2.16.0
          GIT client plugin - 1.19.0
          GIT plugin - 2.4.0
          Additional Behaviours - Choosing strategy: Gerrit Trigger

          After further investigation it seems that the problem is related to the Branch Specifier. If "Branches to build" is blank it is replaced with "**" and the error occurs. Replacing it with $GERRIT_BRANCH fixed the configuration.

          Cezariusz Marek added a comment - Gerrit Trigger - 2.16.0 GIT client plugin - 1.19.0 GIT plugin - 2.4.0 Additional Behaviours - Choosing strategy: Gerrit Trigger After further investigation it seems that the problem is related to the Branch Specifier. If "Branches to build" is blank it is replaced with "**" and the error occurs. Replacing it with $GERRIT_BRANCH fixed the configuration.

          Mark Waite added a comment -

          The GitTagAction constructor is no longer called by the git plugin during checkout unless the administrator has enabled GitTagAction intentionally. Git plugin 4.5.0 removed the git tag action by default. The global configuration documentation provides more details.

          Mark Waite added a comment - The GitTagAction constructor is no longer called by the git plugin during checkout unless the administrator has enabled GitTagAction intentionally. Git plugin 4.5.0 removed the git tag action by default. The global configuration documentation provides more details.

            Unassigned Unassigned
            cezariuszmarek Cezariusz Marek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: