|
Hi,
Is there a way to figure out if a plugin is being used? (either groovy script, CLI, api/xml, etc) We have a bunch of plugins installed, but I don't think we are not using half of them and I would like to uninstall them. Thanks! |
|
This is one of the suggested topics I've added to the list for JUC: https://wiki.jenkins-ci.org/display/JENKINS/Governance+Meeting+Agenda#GovernanceMeetingAgenda-JenkinsUserConferenceMeeting@SanFrancisco
/Domi On 24.09.2012, at 20:47, grayaii <[hidden email]> wrote: > Hi, > Is there a way to figure out if a plugin is being used? (either groovy > script, CLI, api/xml, etc) > We have a bunch of plugins installed, but I don't think we are not using > half of them and I would like to uninstall them. > Thanks! > > > > -- > View this message in context: http://jenkins.361315.n4.nabble.com/way-to-determine-if-plugin-is-being-used-tp4641231.html > Sent from the Jenkins users mailing list archive at Nabble.com. |
|
In reply to this post by grayaii
I do hate to put this hat on excessively on this list We have an Enterprise plugin that provides that feature: http://jenkins-enterprise.cloudbees.com/docs/user-guide-bundle/plugin-usage.html
It is currently available as a beta release, but will be in the 12.11 release
[/CloudBees hat] [Not wearing CloudBees hat at all and I never said this] If you just have a one time need, you could try the plugin with the evaluation license... but then once the evaluation license expires you will never be able to get an evaluation license on that Jenkins instance again :-(
[/Not wearing CloudBees hat at all and I never said this] -Stephen On 24 September 2012 19:47, grayaii <[hidden email]> wrote: Hi, |
|
This post has NOT been accepted by the mailing list yet.
In reply to this post by grayaii
Hi
I have written groovy script as well as java code to get the list of enabled builders as well as publishers...As jenkins is saving the publishers and builders we can get the list and with the listed publisher/builders name we can match the plugins u need...so this way u can do it.Check for api in Jenkins. For plugins in other cateogry I have not tried...u can check...there must be a way out for it thanks diptiman |
|
In reply to this post by stephenconnolly
extending your [Not wearing CloudBees hat time]…. any hint on how this was implemented? :) /Domi On 26.09.2012, at 10:18, Stephen Connolly <[hidden email]> wrote:
|
|
Ask mr glick... He wrote it... Though he may not be allowed to spill the beans ;-)
On Wednesday, 26 September 2012, domi wrote:
|
|
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi All,
I am adding some example for checking what are the builders being used for one Job in groovy.I have used this one in groovy template in email ext template <% def project = job.getLastBuild().getProject()%> <% def builders = project.getBuilders()%> so builders will return a list of enabled(active) builders for that project. Getting the publisher list in groovy <% def project = job.getLastBuild().getProject()%> <% def publishers = project.getPublishersList().toList()%> This will give the list of all publishers(Configured for that job). This part of script u can use at the runtime(e.g- when run of build,For a project ). My purpose was different so I used like this. Search in AbstractProject.java file in Jenkins code to get the functions. You have to use the piece of code according to your need. Please let me know if you are facing any problem.I think its better to create a small plugin which will display a sidepanel link on which u can click the plugins configured .I got some idea for that plugin what we need to do. U can check this piece of code: List<Job> list = Jenkins.getInstance().getAllItems(Job.class); System.out.println("list:" + list); for (Job job : list) { AbstractProject<?,?> project = (AbstractProject<?, ?>)job; project.getPublishersList(); for(Publisher pub : project.getPublishersList()) { System.out.println("Jobname:" + job + "\nPublisher Display Name:" + pub.getDescriptor().getDisplayName()); } Project<?,?> pro = (Project<?, ?>)job; for(Builder builder : pro.getBuilders()) { System.out.println("Jobname:" + job + "\nBuilder List Name:" + builder.getDescriptor().getDisplayName()); } } Since Jenkins is persisting the configuration data for all plugins I am sure there will be a way to do it.Please let me know if any difficulty Thanks Diptiman |
| Powered by Nabble | Edit this page |
