Hello Robin
I'm facing a weird issue where a step is cancelled due to the following groovy error:
failed: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
script1528314509681170623410.groovy: 2: unexpected token: def @ line 2, column 1.
def package = system-2018.3.1-debug_proto
^
1 error
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302)
at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:149)
at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:119)
at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:131)
at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:359)
at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:142)
at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:108)
at org.codehaus.groovy.control.SourceU...
In the step Execute Condition, I use "if specified script evaluates to true", and this is the script
groovy:
def package = ${params.get('release_name')}
if (package.contains('int_test') == false)
return true
return false
Is there some restriction I broke here using groovy?
Thanks!
- solved #3
- replies 3
- views 3186
- stars 0
-