Skip to content

Instantly share code, notes, and snippets.

@CodeFreezr
Last active September 20, 2017 15:00
Show Gist options
  • Save CodeFreezr/c96bc7b8e8bb32bb5daf38e25450058d to your computer and use it in GitHub Desktop.
Save CodeFreezr/c96bc7b8e8bb32bb5daf38e25450058d to your computer and use it in GitHub Desktop.
Simple Jenkins Inline script to generate dot graph of plugin dependencies
def plugins = jenkins.model.Jenkins.instance.getPluginManager().getPlugins()
println "digraph test {"
println "rankdir=LR;"
println "node [shape = box,height=.1,fontsize=48,fontname=Helvetica,fillcolor=yellow,style=filled];"
plugins.each {
def plugin = it.getShortName()
println "\"${plugin}\";"
def deps = it.getDependencies()
deps.each {
def s = it.shortName
println "\"${plugin}\" -> \"${s}\";"
}
}
println "}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment