Hi,
We have "string", "booleanParam", "choice", etc. but nothing for numeric types. Is there a reason why not?
I have a pipeline where I would like a parameter to be a duration (in hours) to invoke a "sleep" step.
Using "string" doesn't work because sleep is expecting an int. And if I try using a "script" step, I need to convert hours to seconds but I can't invoke toFloat() and toInt() because I get
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods toFloat java.lang.String
I know I could disable the sandbox for the latter issue, but I'd rather not - it would make more sense to be able to provide a numeric type to the pipeline in the first place. Or maybe for the Sleep step to try to coerce the string to an int via DescribableModel.java.
Many thanks,
Dave