Sep 25, 2020

Abort / Kill multiple pending Jenkins Jobs using Groovy

 Simple execute below code on Jenkins server machine to Abort / Kill all Pending / Queued Jobs:

import hudson.model.*
def queue = Hudson.instance.queue
println "Queue contains ${queue.items.length} items"
queue.clear()
println "Queue cleared"

 
src: https://github.com/jenkinsci/jenkins-scripts/blob/master/scriptler/clearBuildQueue.groovy

No comments:

Post a Comment

Thanks a lot for your valuable Comment!

Featured this week

Latest Employment BUZZ: 4 working days in a week?

COVID-19 has hit mostly all sectors including IT  too bad. If we think otherwise, on the other hand,  there have been many new technical inn...