Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ryanwoodsmall/d8556cb3dee04b6ec263f49804f40c04 to your computer and use it in GitHub Desktop.
Save ryanwoodsmall/d8556cb3dee04b6ec263f49804f40c04 to your computer and use it in GitHub Desktop.
jenkins_abort_job_by_name_and_build_number.groovy
Jenkins.instance
.getItemByFullName("JobName")
.getBuildByNumber(JobNumber)
.finish(hudson.model.Result.ABORTED,
new java.io.IOException("Aborting build")
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment