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 -- 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/f4b73bff-f6ad-436d-a7de-14a1256d19d5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
