jenkinsci / allure-plugin

Allure Jenkins Plugin
https://plugins.jenkins.io/allure-jenkins-plugin/
Other
84 stars 63 forks source link

Calling from jenkins pipelines throws an error: "No signature of method: allure.call()" #312

Closed bwomsm1 closed 1 year ago

bwomsm1 commented 2 years ago

Jenkins and plugins versions report

Environment ```text Paste the output here ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Jenkins Linux OS

Reproduction steps

Simply call to Allure report generation: allure([ includeProperties: false, jdk : '', properties : [], reportBuildPolicy: 'ALWAYS', results : [[path: '/Users/boazwarshawsky/workspace/PyCharm/products-automation-framework/output/allure']] ])

You can assume that /Users/boazwarshawsky/workspace/PyCharm/products-automation-framework/output/allure path is exists.

Expected Results

Allure report should be generated.

Actual Results

Error is raisd:

08:29:29  [Pipeline] // node
08:29:29  [Pipeline] End of Pipeline
08:29:29  hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: allure.call() is applicable for argument types: (java.util.LinkedHashMap) values: [[includeProperties:false, jdk:, properties:[], reportBuildPolicy:ALWAYS, ...]]
08:29:29  Possible solutions: wait(), any(), wait(long), main([Ljava.lang.String;), any(groovy.lang.Closure), each(groovy.lang.Closure)
08:29:29    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:71)
08:29:29    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:77)
08:29:29    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:53)
08:29:29    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
08:29:29    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
08:29:29    at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
08:29:29    at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
08:29:29    at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:158)
08:29:29    at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:143)
08:29:29    at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
08:29:29    at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
08:29:29    at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
08:29:29    at WorkflowScript.run(WorkflowScript:19)
08:29:29    at ___cps.transform___(Native Method)
08:29:29    at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
08:29:29    at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
08:29:29    at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83)
08:29:29    at jdk.internal.reflect.GeneratedMethodAccessor382.invoke(Unknown Source)
08:29:29    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
08:29:29    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
08:29:29    at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
08:29:29    at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
08:29:29    at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
08:29:29    at jdk.internal.reflect.GeneratedMethodAccessor390.invoke(Unknown Source)
08:29:29    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
08:29:29    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
08:29:29    at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
08:29:29    at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
08:29:29    at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
08:29:29    at jdk.internal.reflect.GeneratedMethodAccessor390.invoke(Unknown Source)
08:29:29    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
08:29:29    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
08:29:29    at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
08:29:29    at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
08:29:29    at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
08:29:29    at jdk.internal.reflect.GeneratedMethodAccessor390.invoke(Unknown Source)
08:29:29    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
08:29:29    at java.base/java.lang.reflect.Method.invoke(Method.java:566)

Anything else?

No response

dt-vincent-verdeil commented 1 year ago

Hi @bwomsm1, have you tried calling allure without the parenthesis?

allure includeProperties: false, jdk: '', properties: [], reportBuildPolicy: 'ALWAYS', results: [[path: '/Users/boazwarshawsky/workspace/PyCharm/products-automation-framework/output/allure']]
vbragin commented 1 year ago

Cannot reproduce, maybe some step-by-step description with all config will help! please if you still need - provide it.