How can I install a specific version of a plugin using pluginManager?

36 views
Skip to first unread message

Guy Matz

unread,
Mar 13, 2018, 10:17:51 AM3/13/18
to Jenkins Developers
I can do this sort of thing (improvements are welcome!):
plugin = 'github'
instance = Jenkins.getInstance()
pm = instance.getPluginManager()
uc = instance.getUpdateCenter()

plugin = uc.getPlugin(plugin_name)
plugin.deploy()

But would like to be able to specify the version of plugin, e.g. github:1.29.0

Any ideas?

Thanks a lot,
Guy

P.S. - SHould I have sent this to the jenkins-users mailing list?

Daniel Beck

unread,
Mar 13, 2018, 10:27:38 AM3/13/18
to jenkin...@googlegroups.com

> On 13. Mar 2018, at 15:17, Guy Matz <guy...@gmail.com> wrote:
>
> Any ideas?

Not possible as the JSON metadata only contains the latest version (that's compatible with your Jenkins).

You can upload a specific plugin file though.

> P.S. - SHould I have sent this to the jenkins-users mailing list?

Only if you knew what the answer would be :-) Internal API questions like in your email could reasonably go either way, but in this case the answer is the same whether Jenkins CLI, UI, or internal APIs.

Reply all
Reply to author
Forward
0 new messages