How can I get a list of installed Jenkins plugins?
I searched the Jenkins Remote Access API document, but it was not found. Should I use Jenkins\' CLI? Is there a d
Behe's answer with sorting plugins did not work on my Jenkins machine. I received the error java.lang.UnsupportedOperationException due to trying to sort an immutable collection i.e. Jenkins.instance.pluginManager.plugins. Simple fix for the code:
List jenkinsPlugins = new ArrayList(Jenkins.instance.pluginManager.plugins);
jenkinsPlugins.sort { it.displayName }
.each { plugin ->
println ("${plugin.shortName}:${plugin.version}")
}
Use the http:// URL to run the code.