Search code examples
jenkinsjenkins-pluginsjenkins-pipelinejenkins-cli

Plugin list comparison in Jenkins


Is there any plugin or a way that allow me to compare the plugin list of the masters in Jenkins. We want to know which master has which plugin and which master does have the plugin that is installed on other master.


Solution

  • Not a automated process however the listing of the plugins can be done in a few ways.

    Firstly you can use the system info from within the manage Jenkins screen it will give you a list you can put in a text file and diff.

    Second option is to use the scripting console from within the manage Jenkins screen:

    Jenkins.instance.pluginManager.plugins.each{ 
     plugin -> 
    println ("${plugin.getDisplayName()} 
    (${plugin.getShortName()}): ${plugin.getVersion()}")
    }
    

    Diff the files using your favourite diffing tool

    I have found another way of doing this which could be automated using remote access to the Jenkins scripting console you can use the following

    $ curl --user 'username:password' --data-urlencode "script=$(<./somescript.groovy)" http://jenkins/scriptText
    

    Then I assume you could use the above script to get the list and automate the listing of the plugins, so that you can compare at will. More information on the Jenkins remote access is on the jenkins site here