how to return a failure from scriptler ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to return a failure from scriptler ?

Guy Matz
Hello!
I'm trying to have a build fail when something goes wrong in scriptler, but I can't get this to work.  I'm trying something like this:
doSomething() || return false

This fails in scripler with:
Execution of script [promoteBuild.groovy] failed - org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 51: unexpected token: return @ line 51, column 85.
   doSomething() || return fal

Anyone know how to fail a build from scriptler?

Thanks!
Guy

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtVs1rN6Sv-RVuA6vHjTL5DcwMUTuyB2bHSiAyXcR1n8rQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to return a failure from scriptler ?

Guy Matz
So I think a false return from scriptler is supposed to fail the build.  anyone know why this syntax does not work in scriptler  Better yet, does anyone know what doe work?

Thanks!

On Thu, Jul 13, 2017 at 10:06 AM, Guy Matz <[hidden email]> wrote:
Hello!
I'm trying to have a build fail when something goes wrong in scriptler, but I can't get this to work.  I'm trying something like this:
doSomething() || return false

This fails in scripler with:
Execution of script [promoteBuild.groovy] failed - org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 51: unexpected token: return @ line 51, column 85.
   doSomething() || return fal

Anyone know how to fail a build from scriptler?

Thanks!
Guy

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtXfG3wrBDRvdOG8FXFM2-QKR80eHdVSUQb2QwXr4oH9-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...