List jenkins plugins and dependencides (with graph) -


i have added many plugins jenkins. how can list plugins , dependencies ? plugins depend on 1 ? 1 orphan, etc.

ideally, explain how make graph (graphviz/dot...) ?

copy-paste groovy snippet list of plugins (this snippet based on this exemple zendesk.com):

note: groovy must pasted in _manage jenkins >> script console

def plugins = jenkins.model.jenkins.instance.getpluginmanager().getplugins() plugins.each {     println "${it.getshortname()} (${it.getversion()}) => ${it.getdependencies()}" } 

to produce graph, execute snippet generate dot graph (graphviz) file...

def plugins = jenkins.model.jenkins.instance.getpluginmanager().getplugins() println "digraph test {" plugins.each {     def plugin = it.getshortname()     println "\"${plugin}\";"     def deps =  it.getdependencies()     deps.each {       def s = it.shortname       println "\"${plugin}\" -> \"${s}\";"     } }  println "}" 

then use graphviz generate image output above:

dot -tsvg  plugins.txt > plugins.svg dot -png  plugins.txt > plugins.png 

or copy-paste output in 1 of graphviz: online tool capable of accepting larger files


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -