How to make a Jenkins job status as aborted

2020-06-08 16:40发布

问题:

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?

回答1:

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".