我想在下面詹金斯代碼運行建立流動groovy.lang.MissingMethodException:法無簽名:在常規的詹金斯buildflow
def generator = { String alphabet, int n ->
new Random().with {
(1..n).collect { alphabet[ nextInt(alphabet.length()) ] }.join()
}
}
pattern = '0x' + generator((('A'..'F')+('0'..'9')).join(), 16)
plintln "Random Pattern Created :" + pattern
輸出低於
ERROR: Failed to run DSL Script groovy.lang.MissingMethodException: No signature of method: com.cloudbees.plugins.flow.FlowDelegate.plintln() is applicable for argument types: (java.lang.String) values: [Random Pattern Created :0xAC0E837A5284A407] Possible solutions: println(java.lang.String), println(), println(java.io.PrintWriter), println(java.lang.Object), print(java.lang.Object), printf(java.lang.String, [Ljava.lang.Object;) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)