Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Please comment & let me know if you have a fork / fixes you'd like to include.
import java.util.ArrayList | |
import hudson.model.*; | |
// Remove everything which is currently queued | |
def q = Jenkins.instance.queue | |
for (queued in Jenkins.instance.queue.items) { | |
q.cancel(queued.task) | |
} | |
// stop all the currently running jobs |
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Please comment & let me know if you have a fork / fixes you'd like to include.