On Wed, Jul 29, 2020 at 8:44 AM Philipp Mahlberg <[email protected]> wrote: > run.setResult(jenkinsResult);
Do not call `setResult`. Use exceptions only. > In pipeline mode, this works as expected. The first line is not even needed, > even without it, the build stops and will be marked as ABORTED. Must be a mistake. `AbortException`, despite the name, should produce `Result.FAILURE`. It is the stock marker for a build which failed not due to any bug in Jenkins (an expected failure), so no stack trace is printed. > I know that I can achieve the ABORT state by "interrupting" the build. But > interrupting seems to encode the user actively stopping the build e.g. by > clicking the red cross. For Pipeline builds, `FlowInterruptedException` encodes a cause and a result, defaulting to `ABORTED`. There is no exact equivalent for traditional job types but (IIRC) any `InterruptedException` will count as `ABORTED`. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1sCtwqv3cqFSAnFP5eYYj5HgnoTF4ydQCgPf4__zNp4w%40mail.gmail.com.
