Jenkins had 600+ plugins, in the real system, we are used to install lots of plugins.
And sometimes, we want to remove some plugins to make system more clean or replace with another mature plugin (different name).
This needs to make sure no one/no job use those plugins or I need to notify them.
Are there any ways in configuration or somewhere in Jenkins system to know whether the plugin is used by any jobs ?
UPDATE 2013 Based on the answer below, I maintain the simple "plugin:keyword" mapping, like
plugin_keys = {
"git":'scm class="hudson.plugins.git.GitSCM"',
"copyartifact":"hudson.plugins.copyartifact.CopyArtifact",
# and more
}
And search the plugin keyword from the config.xml
, all the information (plugins,jobs,config) can be fetched via jenkins remote API
it works for me.
UPDATE 2014.04.26 Later jenkins version, it seems the config.xml is changed to have plugin name there directly
Like
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]">
<hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="[email protected]">
<hudson.plugins.disk__usage.DiskUsageProperty plugin="[email protected]"/>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
Therefore I just check this plugin="<plugin name>"
in config.xml
, it works again
UPDATE 2014.05.05
See complete script in gist jenkins-stats.py
UPDATE 2018.6.7
There is plugin usage plugin support this (no REST API yet)