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 document or example?
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 document or example?
From the Jenkins home page:
Or
You can be also interested what updates are available for plugins. For that, you have to merge the data about installed plugins with information about updates available here https://updates.jenkins.io/current/update-center.json .
To parse the downloaded file as a JSON you have to read online the second line (which is huge).
If Jenkins run in a the Jenkins Docker container you can use this command line in Bash:
If you are a Jenkins administrator you can use the Jenkins system information page:
If you're working in a docker environment and want to output the plugin list in a plugins.txt format in order to pass that to the install_scripts.sh use these scripts in the
http://{jenkins}/script
console: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:Use the
http://<jenkins-url>/script
URL to run the code.