How to list all unused jenkins plugins?

后端 未结 3 658
死守一世寂寞
死守一世寂寞 2021-02-19 02:14

I am looking for method to check which jenkins plugins are not used. So far I found that I can look for tags in config.xml file with attribute plugin then comp

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-19 02:41

    Some plugins only affect the Jenkins system configuration, rather than individual jobs; you should be able to find those by changing the find method in your code to include /home/user/.jenkins/config.xml.

    Many plugins have their own configuration files in $JENKINS_HOME, e.g. $JENKINS_HOME/org.jenkinsci.plugins.p4.PerforceScm.xml. I haven't looked into this, but your might be able to find some extra plugin usage by searching the config.xml files for the plugin name (e.g. PerforceSCM) rather than the term "plugin".

    Also, if you only want to search for jobs that are enabled, you can filter out jobs with "true" in their config.xml.

提交回复
热议问题