Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55576

Hudson.instance.updateCenter.getPlugin(String,VersionNumber) seems to not exists

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • scriptler-plugin
    • Jenkins console script

      example script :

       

      for (plugin in [
      ["ace-editor", new hudson.util.VersionNumber("1.1")],
      ["active-directory", new hudson.util.VersionNumber("2.10")],
      ["ant", new hudson.util.VersionNumber("1.8")],
      ["antisamy-markup-formatter", new hudson.util.VersionNumber("1.5")],
      ["apache-httpcomponents-client-4-api", new hudson.util.VersionNumber("4.5.5-3.0")],
      ["authentication-tokens", new hudson.util.VersionNumber("1.3")],
      ["backup", new hudson.util.VersionNumber("1.6.1")],
      ["bouncycastle-api", new hudson.util.VersionNumber("2.17")],
      ["branch-api", new hudson.util.VersionNumber("2.1.1")],
      ["build-blocker-plugin", new hudson.util.VersionNumber("1.7.3")],
      ["build-monitor-plugin", new hudson.util.VersionNumber("1.12+build.201809061734")],
      ["build-pipeline-plugin", new hudson.util.VersionNumber("1.5.8")],
      ["categorized-view", new hudson.util.VersionNumber("1.10")],
      ["cloudbees-folder", new hudson.util.VersionNumber("6.5.1")],
      ["cobertura", new hudson.util.VersionNumber("1.13")],
      ["code-coverage-api", new hudson.util.VersionNumber("1.0.5")],
      ["command-launcher", new hudson.util.VersionNumber("1.2")],
      ["conditional-buildstep", new hudson.util.VersionNumber("1.3.6")],
      ["credentials-binding", new hudson.util.VersionNumber("1.17")],
      ["credentials", new hudson.util.VersionNumber("2.1.18")],
      ["cvs", new hudson.util.VersionNumber("2.14")],
      ["discard-old-build", new hudson.util.VersionNumber("1.05")],
      ["display-url-api", new hudson.util.VersionNumber("2.3.0")],
      ["docker-commons", new hudson.util.VersionNumber("1.13")],
      ["docker-workflow", new hudson.util.VersionNumber("1.17")],
      ["durable-task", new hudson.util.VersionNumber("1.28")],
      ["email-ext", new hudson.util.VersionNumber("2.63")],
      ["external-monitor-job", new hudson.util.VersionNumber("1.7")],
      ["fxcop-runner", new hudson.util.VersionNumber("1.1")],
      ["git-client", new hudson.util.VersionNumber("2.7.4")],
      ["git-server", new hudson.util.VersionNumber("1.7")],
      ["git", new hudson.util.VersionNumber("3.9.1")],
      ["handlebars", new hudson.util.VersionNumber("1.1.1")],
      ["htmlpublisher", new hudson.util.VersionNumber("1.17")],
      ["icon-shim", new hudson.util.VersionNumber("2.0.3")],
      ["jackson2-api", new hudson.util.VersionNumber("2.9.7.1")],
      ["javadoc", new hudson.util.VersionNumber("1.4")],
      ["jdk-tool", new hudson.util.VersionNumber("1.0")],
      ["jquery-detached", new hudson.util.VersionNumber("1.2.1")],
      ["jquery", new hudson.util.VersionNumber("1.12.4-0")],
      ["jsch", new hudson.util.VersionNumber("0.1.54.2")],
      ["junit", new hudson.util.VersionNumber("1.26.1")],
      ["last-changes", new hudson.util.VersionNumber("2.6.8")],
      ["ldap", new hudson.util.VersionNumber("1.20")],
      ["mailer", new hudson.util.VersionNumber("1.22")],
      ["mapdb-api", new hudson.util.VersionNumber("1.0.9.0")],
      ["matrix-auth", new hudson.util.VersionNumber("2.3")],
      ["matrix-project", new hudson.util.VersionNumber("1.13")],
      ["maven-plugin", new hudson.util.VersionNumber("3.2")],
      ["momentjs", new hudson.util.VersionNumber("1.1.1")],
      ["msbuild", new hudson.util.VersionNumber("1.29")],
      ["ncover", new hudson.util.VersionNumber("0.3")],
      ["nunit", new hudson.util.VersionNumber("0.23")],
      ["pam-auth", new hudson.util.VersionNumber("1.4")],
      ["parameterized-trigger", new hudson.util.VersionNumber("2.35.2")],
      ["periodicbackup", new hudson.util.VersionNumber("1.5")],
      ["pipeline-build-step", new hudson.util.VersionNumber("2.7")],
      ["pipeline-graph-analysis", new hudson.util.VersionNumber("1.9")],
      ["pipeline-input-step", new hudson.util.VersionNumber("2.8")],
      ["pipeline-milestone-step", new hudson.util.VersionNumber("1.3.1")],
      ["pipeline-model-api", new hudson.util.VersionNumber("1.3.3")],
      ["pipeline-model-declarative-agent", new hudson.util.VersionNumber("1.1.1")],
      ["pipeline-model-definition", new hudson.util.VersionNumber("1.3.3")],
      ["pipeline-model-extensions", new hudson.util.VersionNumber("1.3.3")],
      ["pipeline-rest-api", new hudson.util.VersionNumber("2.10")],
      ["pipeline-stage-step", new hudson.util.VersionNumber("2.3")],
      ["pipeline-stage-tags-metadata", new hudson.util.VersionNumber("1.3.3")],
      ["pipeline-stage-view", new hudson.util.VersionNumber("2.10")],
      ["plain-credentials", new hudson.util.VersionNumber("1.4")],
      ["powershell", new hudson.util.VersionNumber("1.3")],
      ["PrioritySorter", new hudson.util.VersionNumber("3.6.0")],
      ["run-condition", new hudson.util.VersionNumber("1.2")],
      ["scm-api", new hudson.util.VersionNumber("2.3.0")],
      ["scm-sync-configuration", new hudson.util.VersionNumber("0.0.10")],
      ["script-security", new hudson.util.VersionNumber("1.49")],
      ["ssh-credentials", new hudson.util.VersionNumber("1.14")],
      ["structs", new hudson.util.VersionNumber("1.17")],
      ["subversion", new hudson.util.VersionNumber("2.12.1")],
      ["text-file-operations", new hudson.util.VersionNumber("1.3.2")],
      ["token-macro", new hudson.util.VersionNumber("2.5")],
      ["windows-slaves", new hudson.util.VersionNumber("1.3.1")],
      ["workflow-aggregator", new hudson.util.VersionNumber("2.5")],
      ["workflow-api", new hudson.util.VersionNumber("2.27")],
      ["workflow-basic-steps", new hudson.util.VersionNumber("2.8.3")],
      ["workflow-cps-global-lib", new hudson.util.VersionNumber("2.12")],
      ["workflow-cps", new hudson.util.VersionNumber("2.57")],
      ["workflow-durable-task-step", new hudson.util.VersionNumber("2.22")],
      ["workflow-job", new hudson.util.VersionNumber("2.25")],
      ["workflow-multibranch", new hudson.util.VersionNumber("2.20")],
      ["workflow-scm-step", new hudson.util.VersionNumber("2.7")],
      ["workflow-step-api", new hudson.util.VersionNumber("2.16")],
      ["workflow-support", new hudson.util.VersionNumber("2.20")],
      ]) {
      e = Hudson.instance.updateCenter.getPlugin(plugin[0],plugin[1]).deploy().get().getError()
      if (e != null)
      println e.message
      }

       

       

      Error Output :

      groovy.lang.MissingMethodException: No signature of method: hudson.model.UpdateCenter.getPlugin() is applicable for argument types: (java.lang.String, hudson.util.VersionNumber) values: [ace-editor, 1.1]
      Possible solutions: getPlugin(java.lang.String)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
      at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
      at Script1.run(Script1.groovy:95)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:623)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:594)
      at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:142)
      at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:114)
      at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
      at hudson.util.RemotingDiagnostics.executeGroovy(RemotingDiagnostics.java:111)
      at jenkins.model.Jenkins._doScript(Jenkins.java:4384)
      at jenkins.model.Jenkins.doScript(Jenkins.java:4355)
      at java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)
      at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:130)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:668)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      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:93)
      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:90)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
      at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      at org.eclipse.jetty.server.Server.handle(Server.java:531)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
      at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
      at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
      at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680)
      at java.lang.Thread.run(Unknown Source)

       

      This function seems to be available in the documentation :

      https://javadoc.jenkins.io/hudson/model/UpdateCenter.html

       

            domi Dominik Bartholdi
            cosxsinx Maximilien Zakowski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: