Interview Prep/Jenkins/Best practices & rapid-fire commands

Rapid-fire: how do you abort a stuck build that ignores "Abort"?

IntermediateConceptBest practices & rapid-fire commands
Answer

Escalate step by step: click Abort; then use the build URL /term (terminate), then /kill (hard kill, only offered after term). From the script console as a last resort:

Jenkins.instance.getItemByFullName('shack-app/main').getBuildByNumber(42)
  .doKill()

Stuck builds are usually blocked on a dead agent channel or a swallowed InterruptedException. Fix the root cause after.

All Jenkins questions Roadmap: Jenkins

More on Best practices & rapid-fire commands