Listener for plugin install/removal/etc?

29 views
Skip to first unread message

James Dumay

unread,
Nov 9, 2016, 4:12:14 PM11/9/16
to Jenkins Developers, Vivek Pandey
Hi all,

Is there a Listener we could use to listen for install/remove/etc events from the PluginManager? We have a cache that we'd like to invalidate every time the state of the plugin system changes.

Thanks,

--
James Dumay
Product Manager
CloudBees, Inc.
Skype: jdumaycb Twitter: i386

Stephen Connolly

unread,
Nov 9, 2016, 4:29:33 PM11/9/16
to jenkin...@googlegroups.com
There is a listener for addition, there is currently no removal or update without a restart 
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAErbOvQPuaRz1hmnuW%2BO%3DOzKY4DGeDC%3DSEoV1doP377CtQvRhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Sent from my phone

Daniel Beck

unread,
Nov 9, 2016, 5:20:50 PM11/9/16
to jenkin...@googlegroups.com

> On 09.11.2016, at 22:29, Stephen Connolly <stephen.al...@gmail.com> wrote:
>
> there is currently no removal or update without a restart

And those events could not be trusted anyway, as users could just disable or remove plugins manually by modifying the file system.

James Dumay

unread,
Nov 9, 2016, 5:38:45 PM11/9/16
to Jenkins Developers
Do you know what it is called?

James Dumay

unread,
Nov 9, 2016, 5:39:13 PM11/9/16
to Jenkins Developers, m...@beckweb.net
From my understanding removing from the FS would break a bunch of things right?

Daniel Beck

unread,
Nov 9, 2016, 5:57:07 PM11/9/16
to jenkin...@googlegroups.com

> On 09.11.2016, at 23:39, James Dumay <jdu...@cloudbees.com> wrote:
>
> From my understanding removing from the FS would break a bunch of things right?

No. Shut down Jenkins, remove a plugin .jpi file, or create a plugin .jpi.disabled file, and start Jenkins again. Not really listenable (unless you want Jenkins to record plugins and compare, sending delayed notifications, but that's something your plugin can easily do itself).

James Dumay

unread,
Nov 9, 2016, 6:29:53 PM11/9/16
to jenkin...@googlegroups.com
Right. We just needed to invalidate a cache that wouldn't survive restart anyway. Stephen pointed us to hudson.ExtensionListListener which seems to do the trick in this case (we need to invalidate when the list of extensions changes).

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/UiLSslvVOBA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/C556A548-BBAA-4431-AE4E-AC7D5924BCA7%40beckweb.net.

For more options, visit https://groups.google.com/d/optout.
--
Reply all
Reply to author
Forward
0 new messages