How to terminate Jenkins build in Pipeline Global Library code

11 views
Skip to first unread message

Peter Zhao

unread,
Feb 17, 2017, 3:20:04 PM2/17/17
to Jenkins Developers
Hi Jenkins gurus,

I am working on creating a Pipeline Global Library to extract some common code from different teams's Jenkins files to this library.

In my Library, when some condition is true, I want to terminate the current Jenkins build without executing the rest of the build (build succeed). I know in Jenkins file, a 'return' is good enough. But now I always check the condition in a method of the library, how can I terminate the build there?

Thanks a lot!

Daniel Beck

unread,
Feb 17, 2017, 3:29:37 PM2/17/17
to jenkin...@googlegroups.com

> On 17.02.2017, at 21:20, Peter Zhao <peter....@gmail.com> wrote:
>
> Hi Jenkins gurus,

Please ask questions like this on the jenkinsci-users mailing list.

Reply all
Reply to author
Forward
0 new messages