It's a good practice for a Jenkins administrator to check for installed plugins usage before updating one of them or to understand if some isn't used any more and can be uninstalled. The Enterprise Jenkins release provides a plugin ( http://www.cloudbees.com/jenkins-enterprise-by-cloudbees-features-plugin-usage-plugin.cb ) that shows in a tabular form the usage of the installed plugins across the different jobs in a Jenkins instance. It is a really simple but extremely helpful plugin. But how could you do the same if no Enterprise Jenkins is available for you? The same functionality can be implemented with a quite simple Groovy script using the Jenkins classes only. This script can be executed from the Jenkins script console (accessible from Manage Jenkins -> Script Console ). Here's the code explained step by step. For a better understanding of this post I suggest you have the basics about the Jenkins model and the Jenkins Java classes. First of all we need to get all ...
Sharing thoughts and tips on Python, Java, Scala, Open Source, DevOps, Data Science, ML/DL/AI.