comquent/imperative-when

regex matching does not work

zipidude opened this issue · 1 comments

Hello!

I need regex matching but it does not seem to work?

when(params.manage_steps =~ /update_remote_deploy/) {

Also: hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: when.call() is applicable for argument types: (java.util.regex.Matcher, org.jenkinsci.plugins.workflow.cps.CpsClosure2) values: [java.util.regex.Matcher[pattern=/update_remote_deploy/ region=0,8 lastmatch=], ...] Possible solutions: call(boolean, java.lang.Object), wait(), any(), run(), run(), collect() Also: hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: when.call() is applicable for argument types: (java.util.regex.Matcher, org.jenkinsci.plugins.workflow.cps.CpsClosure2) values: [java.util.regex.Matcher[pattern=/update_remote_deploy/ region=0,8 lastmatch=], ...] Possible solutions: call(boolean, java.lang.Object), wait(), any(), run(), run(), collect() hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: when.call() is applicable for argument types: (java.util.regex.Matcher, org.jenkinsci.plugins.workflow.cps.CpsClosure2) values: [java.util.regex.Matcher[pattern=/update_remote_deploy/ region=0,8 lastmatch=], ...]

IRus commented

Probably when(params.manage_steps ==~ /update_remote_deploy/) { should work