3

私は頭がおかしいので、誰かが私を助けてくれることを願っています。2 つのサーバーがあり、1 つは 8080 で実行されている jenkins でセットアップされ、もう 1 つは gitlab でセットアップされています。gitlab へのプッシュ時にジェンキンス ビルドを有効にしようとしていますが、うまくいきません。ソースをダウンロードしてコンパイルし、追加のログを追加するところまで行きましたが、まだ何もしていません。この問題は、gitlab でフックをテストしているときに発生します。フックをテストすると、jenkins ログに次のエラーが表示されます。

Oct 4, 2012 12:09:34 PM com.cloudbees.jenkins.GitHubWebHook processGitHubPayload
INFO: Received payload for null
2012-10-04 12:09:34.743:Jenkins v1.445:WARN:  Error while serving http://160.129.228.150:8080/github-webhook/
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
    at org.kohsuke.stapler.MetaClass$2.dispatch(MetaClass.java:149)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:377)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:285)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: net.sf.json.JSONException: null object
    at net.sf.json.JSONObject.verifyIsNull(JSONObject.java:2428)
    at net.sf.json.JSONObject.getJSONObject(JSONObject.java:1751)
    at com.cloudbees.jenkins.GitHubWebHook.processGitHubPayload(GitHubWebHook.java:160)
    at com.cloudbees.jenkins.GitHubWebHook.doIndex(GitHubWebHook.java:154)
    ... 45 more
2012-10-04 12:09:34.744::WARN:  EXCEPTION
javax.servlet.ServletException: net.sf.json.JSONException: null object
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:605)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:377)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:285)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: net.sf.json.JSONException: null object
    at net.sf.json.JSONObject.verifyIsNull(JSONObject.java:2428)
    at net.sf.json.JSONObject.getJSONObject(JSONObject.java:1751)
    at com.cloudbees.jenkins.GitHubWebHook.processGitHubPayload(GitHubWebHook.java:160)
    at com.cloudbees.jenkins.GitHubWebHook.doIndex(GitHubWebHook.java:154)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
    at org.kohsuke.stapler.MetaClass$2.dispatch(MetaClass.java:149)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
    ... 36 more
2012-10-04 12:09:34.745::WARN:  Nested in javax.servlet.ServletException: net.sf.json.JSONException: null object:
net.sf.json.JSONException: null object
    at net.sf.json.JSONObject.verifyIsNull(JSONObject.java:2428)
    at net.sf.json.JSONObject.getJSONObject(JSONObject.java:1751)
    at com.cloudbees.jenkins.GitHubWebHook.processGitHubPayload(GitHubWebHook.java:160)
    at com.cloudbees.jenkins.GitHubWebHook.doIndex(GitHubWebHook.java:154)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
    at org.kohsuke.stapler.MetaClass$2.dispatch(MetaClass.java:149)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:377)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:285)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
2012-10-04 12:09:34.745::WARN:  /github-webhook/:
net.sf.json.JSONException: null object
    at net.sf.json.JSONObject.verifyIsNull(JSONObject.java:2428)
    at net.sf.json.JSONObject.getJSONObject(JSONObject.java:1751)
    at com.cloudbees.jenkins.GitHubWebHook.processGitHubPayload(GitHubWebHook.java:160)
    at com.cloudbees.jenkins.GitHubWebHook.doIndex(GitHubWebHook.java:154)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
    at org.kohsuke.stapler.MetaClass$2.dispatch(MetaClass.java:149)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:377)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:285)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
2012-10-04 12:09:34.746::WARN:  /github-webhook/
net.sf.json.JSONException: null object
    at net.sf.json.JSONObject.verifyIsNull(JSONObject.java:2428)
    at net.sf.json.JSONObject.getJSONObject(JSONObject.java:1751)
    at com.cloudbees.jenkins.GitHubWebHook.processGitHubPayload(GitHubWebHook.java:160)
    at com.cloudbees.jenkins.GitHubWebHook.doIndex(GitHubWebHook.java:154)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
    at org.kohsuke.stapler.MetaClass$2.dispatch(MetaClass.java:149)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:377)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:285)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

これは明らかにnull jsonオブジェクトが原因です。GitHubWebHook クラスにさらにログを追加して、何が入ってくるかを確認しました。

public void doIndex(StaplerRequest req) {
    List<String> requestParameterNames  = Collections.list((Enumeration<String>)req.getParameterNames());
    for (String param : requestParameterNames){
      LOGGER.info(param);
    }
    processGitHubPayload(req.getParameter("payload"),GitHubPushTrigger.class);
}

ただし、パラメーター列挙ループについては何もログに記録されません。何が送信されているかを確認するために、RequestBin を指す別のフックを追加しました。

body
{color:#404040}{ "after": "107d58a97e22566e9a945aea3fbfc95e118cad62", "before": "8c99ce6e10f59caa1dac88b192d003d525ad741d", "commits": \[ { "author": { "email": "bob.mcclellan@gmail.com", "name": "Bob McClellan Jr" }, "id": "654f98a9705812e7525be39ac3e64249e3b062ee", "message": "Updated readme.", "timestamp": "2012-04-30T17:11:17-05:00", "url": "https://cgc-git.mc.vanderbilt.edu/hermes/commits/654f98a9705812e7525be39ac3e64249e3b062ee" }, { "author": { "email": "bob.mcclellan@gmail.com", "name": "Bob McClellan Jr" }, "id": "ceda577922f585760e7a7c208b66a5154886dbd1", "message": "Updated readme.", "timestamp": "2012-04-30T17:20:22-05:00", "url": "https://cgc-git.mc.vanderbilt.edu/hermes/commits/ceda577922f585760e7a7c208b66a5154886dbd1" }, { "author": { "email": "bob.mcclellan@gmail.com", "name": "Bob McClellan Jr" }, "id": "4745dbacce4f8f85e9152fac3265fef398a24fce", "message": "Updated readme.", "timestamp": "2012-04-30T17:27:49-05:00", "url": "https://cgc-git.mc.vanderbilt.edu/hermes/commits/4745dbacce4f8f85e9152fac3265fef398a24fce" }, { "author": { "email": "bob.mcclellan@gmail.com", "name": "Bob McClellan Jr" }, "id": "77bd3aa3c55e7c903f7c3ecb5a9692ea997e68f0", "message": "Updated readme.", "timestamp": "2012-04-30T17:33:48-05:00", "url": "https://cgc-git.mc.vanderbilt.edu/hermes/commits/77bd3aa3c55e7c903f7c3ecb5a9692ea997e68f0" }, { "author": { "email": "bob.mcclellan@gmail.com", "name": "Bob McClellan Jr" }, "id": "14ac4a5db34623d357078900efa44fc0dff6c4b2", "message": "Updated readme.", "timestamp": "2012-04-30T17:36:41-05:00", "url": "https://cgc-git.mc.vanderbilt.edu/hermes/commits/14ac4a5db34623d357078900efa44fc0dff6c4b2" }, { "author": { "email": "bob.mcclellan@gmail.com", "name": "Bob McClellan Jr" }, "id": "551d3be096b2aeea886ee0acbaef4d45e70774f4", "message": "Updated readme file.", "timestamp": "2012-05-02T13:07:24-05:00", "url": "https://cgc-git.mc.vanderbilt.edu/hermes/commits/551d3be096b2aeea886ee0acbaef4d45e70774f4" }, { "author": { "email": "bob.mcclellan@gmail.com", "name": "Bob McClellan Jr" }, "id": "c58cba90d9febc9a3bf4f523ef19836140f45f0c", "message": "Update readme file.", "timestamp": "2012-05-02T15:00:36-05:00", "url": "https://cgc-git.mc.vanderbilt.edu/hermes/commits/c58cba90d9febc9a3bf4f523ef19836140f45f0c" }, { "author": { "email": "bob.mcclellan@gmail.com", "name": "Bob McClellan Jr" }, "id": "9c6f03f116cde6c569c2c3ab64ac568f13aa7a3b", "message": "Update readme file.", "timestamp": "2012-05-02T15:01:22-05:00", "url": "https://cgc-git.mc.vanderbilt.edu/hermes/commits/9c6f03f116cde6c569c2c3ab64ac568f13aa7a3b" }, { "author": { "email": "bob.mcclellan@gmail.com", "name": "Bob McClellan Jr" }, "id": "107d58a97e22566e9a945aea3fbfc95e118cad62", "message": "Update readme file.", "timestamp": "2012-05-02T15:02:29-05:00", "url": "https://cgc-git.mc.vanderbilt.edu/hermes/commits/107d58a97e22566e9a945aea3fbfc95e118cad62" } \], "ref": "refs/heads/master", "repository": { "description": "", "homepage": "https://cgc-git.mc.vanderbilt.edu/hermes", "name": "hermes", "url": "https://cgc-git.mc.vanderbilt.edu/hermes" }, "total_commits_count": 9, "user_id": 2, "user_name": "Bob McClellan Jr" }{color}

コードがリクエストで「ペイロード」を探していることは理解していますが、パラメーターに何も表示されていません。誰にもアイデアはありますか?

4

1 に答える 1

3

まさにこの目的のためのGitLabフックプラグインがあります。

于 2012-11-01T22:54:18.787 に答える