jenkinsci / jenkinsci/git-plugin
[JENKINS-31678] NullPointerException when using GitPublisher in release post build actions
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
Configure a job to use the Jenkins release plugin and use the Git publisher as release step after a successful release build. Tick the checkbox "Push only If Build Succeeds". Then a release build failes with the following NullPointerException:
FATAL: null
java.lang.NullPointerException
at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:203)
at hudson.plugins.release.ReleaseWrapper.executeBuildSteps(ReleaseWrapper.java:423)
at hudson.plugins.release.ReleaseWrapper.access$300(ReleaseWrapper.java:99)
at hudson.plugins.release.ReleaseWrapper$4.tearDown(ReleaseWrapper.java:370)
at hudson.model.Build$BuildExecution.doRun(Build.java:173)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
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)
This is caused by the null derefenced buildResult of AbstractBuild.getResult().
---
Originally reported by kleini, imported from: NullPointerException when using GitPublisher in release post build actions
Raw content of original issue
Configure a job to use the Jenkins release plugin and use the Git publisher as release step after a successful release build. Tick the checkbox "Push only If Build Succeeds". Then a release build failes with the following NullPointerException:
FATAL: null
java.lang.NullPointerException
at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:203)
at hudson.plugins.release.ReleaseWrapper.executeBuildSteps(ReleaseWrapper.java:423)
at hudson.plugins.release.ReleaseWrapper.access$300(ReleaseWrapper.java:99)
at hudson.plugins.release.ReleaseWrapper$4.tearDown(ReleaseWrapper.java:370)
at hudson.model.Build$BuildExecution.doRun(Build.java:173)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
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)This is caused by the null derefenced buildResult of AbstractBuild.getResult().
- environment:
Debian Wheezy running Jenkins 1.638 with git-plugin 2.4.0.
Contributor guide
Assessment
This issue has not been assessed yet.