Hi everyone, it's been a while, since I asked the question below. I still couldn't figure out, what 'm doing wrong. Is there anyone, who has a hint?
Thanks! Stefan _____________________________________________ Von: Rademacher, Stefan Gesendet: Dienstag, 30. Juli 2019 14:04 An: [email protected] Betreff: Issue with cps-method-mismatches Hi everyone, my Jenkins Pipeline prints the following message: expected to call java.util.LinkedHashMap.action but wound up catching org.jenkinsci.plugins.workflow.cps.CpsClosure2.call The Jenkinsfile is pipeline { agent { label "Linux-Agent" } stages { stage("Stage") { steps { someStep( action: { sh "echo FOO" } ) } } } } This ist he custom step 'someStep.groovy': def call(additionalActions) { if (additionalActions.action) additionalActions.action() } Console output: Running on Linux-Test (rdev40v59) in /data/jenkins-agent/workspace/Jenkins-Shared-Libs/testjob [Pipeline] { [Pipeline] stage [Pipeline] { (Stage) expected to call java.util.LinkedHashMap.action but wound up catching org.jenkinsci.plugins.workflow.cps.CpsClosure2.call; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/ [Pipeline] sh + echo FOO FOO [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS I have read https://jenkins.io/redirect/pipeline-cps-method-mismatches/, but can't figure out, why this error message occurs in my case. Can anyone help me to find a solution? Best regards Stefan -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9fbfb50b0e6447649044dd69d43ac6b4%40tk.de.
