I have a couple of post build actions that I run on my Hudson build. They are currently bash scripts, and if I want to fail the biuld from them, I just return a non-zero value. Is there a way to fail the build from another scripting language (such as groovy)? Do I just write a script that also returns non-zero? Or is there a particular plugin I need to enable this?
thanks, Jeff
A way to do this programmatically within the Groovy script is:
throw new hudson.AbortException("Something was in my eye...")
The Groovy Postbuild Plugin seems to be what you need, and has a method called buildFailure()
which sets the build result to FAILURE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With