Re: How to terminate Jenkins build in Pipeline Global Library code

2017-02-17 Thread Daniel Beck

> On 17.02.2017, at 21:20, Peter Zhao  wrote:
> 
> Hi Jenkins gurus,

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

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/BAC664D2-3654-43BE-9BB9-BB01F9B345E4%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


How to terminate Jenkins build in Pipeline Global Library code

2017-02-17 Thread Peter Zhao
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!

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/f29d02e9-8ed2-4116-81a8-e29df74d73b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.