Child pages
  • Gitlab Merge Request Builder Plugin
Skip to end of metadata
Go to start of metadata

Plugin Information

View Gitlab Merge Request Builder on the plugin site for more information.

A plugin to build merge requests created in Gitlab.

12 Comments

  1. Hello Tim,

    I've just downloaded the plugin and tried to set proper configuration for my Jenkins project. I've enabled this plugin and wanted to add the Gitlab Project Path (either ssh or http address). When I tried to save the project changes, I got tons of errors.

    A problem occurred while processing the request. Please check our bug tracker to see if a similar problem has already been reported. If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem. If you think this is a new issue, please file a new issue. When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins. The users list might be also useful in understanding what has happened.
    
    Stack tracejavax.servlet.ServletException: java.lang.NullPointerException
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:795)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:875)
    at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:745)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:875)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:237)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:86)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:701)
    Caused by: java.lang.NullPointerException
    at org.gitlab.api.GitlabAPI.<init>(GitlabAPI.java:29)
    at org.gitlab.api.GitlabAPI.connect(GitlabAPI.java:41)
    at org.jenkinsci.plugins.gitlab.Gitlab.connect(Gitlab.java:14)
    at org.jenkinsci.plugins.gitlab.Gitlab.get(Gitlab.java:19)
    at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger$GitlabBuildTriggerDescriptor.getGitlab(GitlabBuildTrigger.java:237)
    at org.jenkinsci.plugins.gitlab.GitlabMergeRequestBuilder.getGitlab(GitlabMergeRequestBuilder.java:62)
    at org.jenkinsci.plugins.gitlab.GitlabRepository.getProjectForPath(GitlabRepository.java:98)
    at org.jenkinsci.plugins.gitlab.GitlabRepository.checkState(GitlabRepository.java:39)
    at org.jenkinsci.plugins.gitlab.GitlabRepository.init(GitlabRepository.java:30)
    at org.jenkinsci.plugins.gitlab.GitlabMergeRequestBuilder.build(GitlabMergeRequestBuilder.java:52)
    at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.start(GitlabBuildTrigger.java:44)
    at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.start(GitlabBuildTrigger.java:27)
    at hudson.model.AbstractProject.submit(AbstractProject.java:1847)
    at hudson.model.Project.submit(Project.java:224)
    at hudson.model.Job.doConfigSubmit(Job.java:1188)
    at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:779)
    at sun.reflect.GeneratedMethodAccessor894.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:622)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:745)
    ... 63 more
    

    Any advice why it is not working? I am using Jenkins ver. 1.585.

  2. When will 1.2.3 be available via this channel?

  3. It looks as though Gitlab 8 is causing issues with the plugin.

  4. Does this work with both GitLab EE (enterprise edition) and GitLab CE (community edition)?

  5. It seems to me that this plugin is having problems due to git-plugin. It builds and if it is OK it merges fine. But it always builds the same original code, never pulling after a merge is done. This mean it is not really building the merge result, and like that it is useless. Any ideas?

  6. It looks like the plugin information links at the top of this page are broken.  The

    The actual GitHub project is:

    https://github.com/timols/jenkins-gitlab-merge-request-builder-plugin

    this project has the 2.0.0 release.  Currently, the plugin info above links to

    https://github.com/jenkinsci/gitlab-merge-request-jenkins-plugin

    which has a different repository name, as well as being in the jenkinsci namespace.  It looks like the timols project needs to be forked to jenkinsci.

  7. It didn't work at first run, I had problems with pulling of branch by environment variable

    *$

    Unknown macro: {gitlabSourceBranch}

    {*}

    .
    This article helped me to solve this.

  8. this project has the 2.0.1 release (https://github.com/timols/jenkins-gitlab-merge-request-builder-plugin/releases). Why juste the 2.0.0 is referenced here ?

  9. I met the same problem, 

  10. Where can Bugs be reported?

    This Plug-In still uses the deprecated API v3. by now it should be v4 !  (https://docs.gitlab.com/ee/api/v3_to_v4.html)


    Therefor we get an error while trying to create a Job (and ofcourse it never runs since the connection doesn't work)

    java.io.FileNotFoundException: https://our.gitlab.installation/api/v3/projects

    → suggestion change request from <server defined in config>/api/v3/projects to <server defined in config>/api/v4/projects

  11. Hi Tim, 

    getting below error with GitLab 11.1.4 and Request Builder plugin 2.0.0

    Stack trace
    java.io.FileNotFoundException: http://XXXX.XX.XX/api/v3/projects
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1890)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
    at org.gitlab.api.http.GitlabHTTPRequestor.parse(GitlabHTTPRequestor.java:324)
    at org.gitlab.api.http.GitlabHTTPRequestor.access$200(GitlabHTTPRequestor.java:28)
    at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:232)
    Caused: java.lang.Error
    at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:239)
    at org.gitlab.api.http.GitlabHTTPRequestor$1.hasNext(GitlabHTTPRequestor.java:193)



    I am not able to compile the code 

    per https://github.com/timols/jenkins-gitlab-merge-request-builder-plugin 

      • GitLab version < 8.1: use v1.2.4 of this plugin
      • GitLab version >= 8.1 < 11: use v2.0.1 of this plugin
      • GitLab version >= 11: use the latest version of this plugin
      I am looking to download the latest plugin version , can some one point me the download link 
  12. Further update : 

    I am able to build the code using old version of gradle from https://github.com/timols/jenkins-gitlab-merge-request-builder-plugin 

    though noticed below error in Jenkins log. 

    WARNING: Failed to save /var/lib/jenkins/org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.xml
    java.io.IOException: java.lang.RuntimeException: Failed to serialize org.jenkinsci.plugins.gitlab.GitlabBuildTrigger$GitlabBuildTriggerDescriptor#jobs for class org.jenkinsci.plugins.gitlab.GitlabBuildTrigger$GitlabBuildTriggerDescriptor
    at hudson.XmlFile.write(XmlFile.java:200)
    at hudson.model.Descriptor.save(Descriptor.java:873)
    at org.jenkinsci.plugins.gitlab.GitlabBuildTrigger.run(GitlabBuildTrigger.java:145)
    at hudson.triggers.Trigger.checkTriggers(Trigger.java:278)
    at hudson.triggers.Trigger$Cron.doRun(Trigger.java:226)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:72)
    at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.RuntimeException: Failed to serialize org.jenkinsci.plugins.gitlab.GitlabBuildTrigger$GitlabBuildTriggerDescriptor#jobs for class org.jenkinsci.plugins.gitlab.GitlabBuildTrigger$GitlabBuildTriggerDescriptor
    at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
    at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
    at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
    at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
    at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
    at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
    at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
    at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
    at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
    at hudson.XmlFile.write(XmlFile.java:193)
    ... 13 more
    Caused by: java.lang.RuntimeException: Failed to serialize org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper#sourceProject for class org.jenkinsci.plugins.gitlab.GitlabMergeRequestWrapper
    at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
    at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
    at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
    at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
    at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
    at com.thoughtworks.xstream.converters.collections.MapConverter.marshal(MapConverter.java:79)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
    at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
    at com.thoughtworks.xstream.converters.collections.MapConverter.marshal(MapConverter.java:79)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
    at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
    at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
    ... 26 more
    Caused by: java.lang.UnsupportedOperationException: Refusing to marshal org.gitlab.api.models.GitlabProject for security reasons; see https://jenkins.io/redirect/class-filter/
    at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:546)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
    at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
    at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
    ... 47 more