epcim of DevOps
8/17/2017 - 4:02 PM

kill-stucked-jenkins-job.groovy

def jobName = ""
def jobNum = ""
Jenkins.instance.getItemByFullName(jobName).getBuildByNumber(jobNum).finish(hudson.model.Result.ABORTED, new java.io.IOException("Aborting build"));