Skip to content

Instantly share code, notes, and snippets.

View chenchix's full-sized avatar
🎯
Focusing

Chencho chenchix

🎯
Focusing
View GitHub Profile
@chenchix
chenchix / kill_all.groovy
Created September 20, 2022 11:22 — forked from steven-terrana/kill_all.groovy
[Kill All Builds] kill all queued and running jobs #Jenkins
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