Skip to content

Instantly share code, notes, and snippets.

@ashishmusale
ashishmusale / Kill_Zombie_Jenkins_Pipleine_Jobs.groovy
Created April 23, 2018 14:42
Kill zombie jenkins pipeline jobs
Jenkins.instance
.getItemByFullName("<job_name>") // e.g. "_huey/app-picker"
.getBranch("<branch_name>")
.getBuildByNumber(<build_number>)
.finish(hudson.model.Result.ABORTED, new java.io.IOException("Aborting build"));