Skip to content

Instantly share code, notes, and snippets.

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