Last active
August 27, 2021 11:17
-
-
Save rmkanda/f1686349c728aaa92a0a5ac67d5d1897 to your computer and use it in GitHub Desktop.
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
## Option #1 - List | |
def plugins = jenkins.model.Jenkins.instance.getPluginManager().getPlugins() | |
plugins.each {println "${it.getShortName()}: ${it.getVersion()}"} | |
## Option #2 - Graph | |
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 "}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment