Created
October 11, 2016 12:06
-
-
Save witokondoria/878d0a82156765f631a6f3909658f7b2 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
scripting console reachable at ${JENKINS_HOME}/script allows us to perform multiple maintenance operations | |
Raw |
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 JOB = 'QA/CD' | |
def start = 1 | |
def end = 1 | |
Jenkins.instance.getItemByFullName(JOB).builds.findAll { | |
it.number >= start && it.number <= end | |
}.each { | |
it.delete() | |
} |
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
Jenkins.instance.pluginManager.plugins.each{ | |
plugin -> | |
println ("${plugin.getDisplayName()} (${plugin.getShortName()}) -> ${plugin.getVersion()} ${plugin.isActive()}") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment