Created
September 10, 2019 15:06
-
-
Save steven-terrana/1f54a8ddae551ad8f51cf66eba14dcde to your computer and use it in GitHub Desktop.
[Get plugins.txt] get all installed plugins and their versions in the required plugins.txt format #Jenkins
This file contains hidden or 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.instance.pluginManager.plugins.each{ plugin -> | |
plugins[plugin.getShortName()] = plugin.getVersion() | |
} | |
plugins.keySet().sort().each{ shortName -> | |
println "${shortName}:${plugins.getAt(shortName)}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment