Created
September 20, 2017 21:36
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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