Created
September 21, 2023 17:07
-
-
Save ryanwoodsmall/d8556cb3dee04b6ec263f49804f40c04 to your computer and use it in GitHub Desktop.
jenkins_abort_job_by_name_and_build_number.groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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