Possibly working-as-intended / could be (somehow?) fixed by me in my plugin implementation, but thought I'd mention it… I upgraded Android Lint to use the @Symbol annotation (which is an excellent feature!), and it has been working great. However, the class that this applies to, LintPublisher, has a no-args @DataBoundConstructor — if no other parameters are specified, a default file pattern is used. So I saw that while "androidLint pattern: '**/foo.xml'" works fine, the no-args variant "androidLint" does not work at all, as Pipeline looks for a global binding with that name:
groovy.lang.MissingPropertyException: No such property: androidLint for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:224)
at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:241)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:238)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:24)
at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
at WorkflowScript.run(WorkflowScript:3)
at ___cps.transform___(Native Method)
I discovered that in order to get the default behaviour, I have to use the syntax "androidLint()", which is not quite as nice as simply "androidLint", which I expected should work. |