I am running some batch commands as a prebuild step for a build. I want to make the status of the build as aborted based on some conditions.
Can anyone tell me what is the errorlevel for 'aborted' in Jenkins?
You have to install the "Conditional build step plugin" and the "Fail the build" plugins. Then you simply add a conditional step, and if the condition is true, you can call the fail build step with state "aborted".
来源:https://stackoverflow.com/questions/8488541/how-to-make-a-jenkins-job-status-as-aborted