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

NPE when git publisher tries to push a tag

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
    • Environment:
      Linux x86_64 / Debian 6.0.5
      Sun java 1.6.0_26
      Jenkins 1.473
      Git plugin 1.1.24
    • Similar Issues:

      Description

      With the latest version of the git plugins, my jobs which push tags to the origin repository have started to fail

      Pushing HEAD to branch post-integration of origin repository
      ERROR: Failed to push tag 0.0.24 to origin
      java.lang.NullPointerException
      	at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:290)
      	at hudson.plugins.git.GitPublisher$3.invoke(GitPublisher.java:268)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2196)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      	at java.lang.Thread.run(Thread.java:636)
      Build step 'Git Publisher' changed build result to FAILURE
      

      I rolled back to 1.1.23 and the same jobs started succeeding again. My jobs are configured to create and push a tag (determined by environment variable) in the git publisher step.

        Attachments

          Activity

          Hide
          algorhythm99 Jason Wooster added a comment -

          This is likely caused by this commit:
          https://github.com/jenkinsci/git-plugin/commit/6aaf169902ce55924fdabf142fc443ef4c80c1ae
          If the tagMessage is NULL then it will most certainly throw a NullPointerException.

          Show
          algorhythm99 Jason Wooster added a comment - This is likely caused by this commit: https://github.com/jenkinsci/git-plugin/commit/6aaf169902ce55924fdabf142fc443ef4c80c1ae If the tagMessage is NULL then it will most certainly throw a NullPointerException.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jason Wooster
          Path:
          src/main/java/hudson/plugins/git/GitPublisher.java
          http://jenkins-ci.org/commit/git-plugin/6ec14325a21a4519cab8e0dd475894d3159138ba
          Log:
          Fix JENKINS-15391 - NullPointerException on Tag publishing

          Use hudson.Util.fixNull to convert a null tagMessage to an empty string

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jason Wooster Path: src/main/java/hudson/plugins/git/GitPublisher.java http://jenkins-ci.org/commit/git-plugin/6ec14325a21a4519cab8e0dd475894d3159138ba Log: Fix JENKINS-15391 - NullPointerException on Tag publishing Use hudson.Util.fixNull to convert a null tagMessage to an empty string
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nicolas De loof
          Path:
          src/main/java/hudson/plugins/git/GitPublisher.java
          http://jenkins-ci.org/commit/git-plugin/b85e054746bb72f29c6aa324f3a027a5fa7fcc8e
          Log:
          Merge pull request #103 from algoRhythm99/master

          [FIXES JENKINS-15391] - Fix for NullPointerException on tag publishing

          Compare: https://github.com/jenkinsci/git-plugin/compare/481749270301...b85e054746bb

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De loof Path: src/main/java/hudson/plugins/git/GitPublisher.java http://jenkins-ci.org/commit/git-plugin/b85e054746bb72f29c6aa324f3a027a5fa7fcc8e Log: Merge pull request #103 from algoRhythm99/master [FIXES JENKINS-15391] - Fix for NullPointerException on tag publishing Compare: https://github.com/jenkinsci/git-plugin/compare/481749270301...b85e054746bb
          Hide
          nickrw Nick Robinson-Wall added a comment -

          Resolving as this was fixed in release 1.1.25 and I have tested with my original failing job.

          Show
          nickrw Nick Robinson-Wall added a comment - Resolving as this was fixed in release 1.1.25 and I have tested with my original failing job.

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              nickrw Nick Robinson-Wall
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: