how to return a failure from scriptler ?

瀏覽次數:20 次
跳到第一則未讀訊息

Guy Matz

未讀,
2017年7月13日 上午11:07:082017/7/13
收件者:jenkins...@googlegroups.com
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

Guy Matz

未讀,
2017年7月16日 上午11:46:552017/7/16
收件者:jenkins...@googlegroups.com
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!
回覆所有人
回覆作者
轉寄
0 則新訊息