How do I remove an unstoppable pipeline job in Jenkins?

I was able to stop the job by submitting a POST request to: http://jenkins.fqdn:8080/job/$JobName/branch/$BranchName/8/term (Note the $JobName and $BranchName variables)

I found this URI by doing the following:

  1. Click on the number next to the job to navigate to that exact job.
  2. Click the Console Output link.
  3. Right-Click the "Click here to forcibly terminate running steps" link.
  4. Click the Inspect menu item. (This is in Chrome; adjust this step for your preferred browser)
  5. Copy the URI from inside the Ajax.Request call. E.g.:onclick="new Ajax.Request('http://jenkins.fqdn:8080/job/$JobName/branch/$BranchName/8/term'); false"

For some reason, clicking the Click here to forcibly terminate running steps link didn't actually terminate the job, but submitting a post request manually did. I suspect it's probably just a little bug in the UI code.


I've got the same problem today and workaround from the comment above didn't help me as well as sending /kill command instead of /term.

I found working solution here:

  1. OPEN https://your.jenkins.fqdn/script
  2. PUT Jenkins.instance.getItemByFullName("jobName").getBuildByNumber(9).finish(hudson.model.Result.ABORTED, new java.io.IOException("Aborting build"));
  3. PRESS "Run"