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 
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,


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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to