[JIRA] (JENKINS-51534) Git Publisher fails with NPE when trying to push a tag

0 views
Skip to first unread message

gunnar.schulze@gmail.com (JIRA)

unread,
May 24, 2018, 4:41:02 PM5/24/18
to jenkinsc...@googlegroups.com
Gunnar Schulze created an issue
 
Jenkins / Bug JENKINS-51534
Git Publisher fails with NPE when trying to push a tag
Issue Type: Bug Bug
Assignee: Mark Waite
Components: git-plugin
Created: 2018-05-24 20:40
Environment: Jenkins 2.124
Git plugin 3.9.0
Release plugin 2.10.1
Priority: Major Major
Reporter: Gunnar Schulze

When trying to use the Git Publisher to push a tag after a successful release build, the build fails with the following exception:

java.lang.NullPointerException
at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:192)
at hudson.plugins.release.ReleaseWrapper.executeBuildSteps(ReleaseWrapper.java:417)
at hudson.plugins.release.ReleaseWrapper.access$300(ReleaseWrapper.java:102)
at hudson.plugins.release.ReleaseWrapper$4.tearDown(ReleaseWrapper.java:364)
at hudson.model.Build$BuildExecution.doRun(Build.java:174)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1794)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
May 24, 2018, 5:01:05 PM5/24/18
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
Change By: Mark Waite
Assignee: Mark Waite

mark.earl.waite@gmail.com (JIRA)

unread,
May 24, 2018, 5:05:03 PM5/24/18
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-51534
 
Re: Git Publisher fails with NPE when trying to push a tag

Please provide more details of the job definition which is being used to create the tag and push it. For example, answers to the following questions are needed:

  1. What are the steps to reproduce the problem?
  2. What job type (Freestyle, Pipeline, Multi-branch Pipeline, Matrix, ...)?
  3. What is the git source server and what protocol is being used (ssh or https)?
  4. What is the credential type used for the git publisher (private key or username/password)?

mark.earl.waite@gmail.com (JIRA)

unread,
May 24, 2018, 5:31:01 PM5/24/18
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-51534
Please provide more details of the job definition which is being used to create the tag and push it.  For example, answers to the following questions are needed:

# What are the steps to reproduce the problem?
# What job type (Freestyle, Pipeline, Multi-branch Pipeline, Matrix, ...)?
# What is the git source server and what protocol is being used (ssh or https)?
# What is the credential type used for the git publisher (private key or username/password)?


Based on the stack trace and [this line|https://github.com/jenkinsci/git-plugin/blob/a7264a2c84a935b6444032c50820d34521d55f43/src/main/java/hudson/plugins/git/GitPublisher.java#L192] in the plugin source code, I'd guess that the project name is set to null.  That is quite unexpected since a project name is seen by users.  I don't know how a user would react to a null or empty project name,.

martin.dreier@sap.com (JIRA)

unread,
Jun 7, 2018, 8:30:02 AM6/7/18
to jenkinsc...@googlegroups.com

I just ran into the same issue. The project name is not empty in my case. To answer the specific questions:

  1. In my job, I have the following steps:
    1. Clone/Fetch from SCM (git)
    2. Execute script (custom for node.js build)
    3. Archive artifacts
    4. Push tag to github - this step is configured to only happen in a release build
  2. Freestyle job
  3. Github Enterprise using HTTPS protocol
  4. Credentials are username/password

The push is happening in a release build (using Github Release plugin). If I move the push to a normal post-build step (with the same parameters) the exception is not thrown.

Reply all
Reply to author
Forward
0 new messages