-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins version: 1.594
Gitlab-plugin version: 1.1.7
Gitlab version: 7.6.2
When viewing a merge request on Gitlab, Gitlab makes a request to Jenkins to get the status of the commit, however this raises a NullPointerException.
The request made by Gitlab looks like this:
https://JENKINS_URL/project/PROJECT_NAME/commits/COMMIT_SHA/status.json?token=TOKEN
And the NullPointerException traceback is:
Caused by: java.lang.NullPointerException at com.dabsquared.gitlabjenkins.GitLabWebHook.getBuildBySHA1(GitLabWebHook.java:440) at com.dabsquared.gitlabjenkins.GitLabWebHook.generateStatusJSON(GitLabWebHook.java:183) at com.dabsquared.gitlabjenkins.GitLabWebHook.getDynamic(GitLabWebHook.java:137) at sun.reflect.GeneratedMethodAccessor238.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161) at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:389) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)