In pipeline stages where a node could be windows or unix, it would be useful to have a generic command step for commands that are the same in batch or shell instead of requiring a conditional isUnix() block or custom function. Example use cases would be calling ruby or python scripts, or running other programs that have the same CLI on multiple platforms like doxygen, cmake etc.
My current workaround is:
Or to reduce the number of isUnix calls and outputs in Blue Ocean or Stage View, have the isUnix bool an argument for the command method.
This is a simple workaround but somewhat annoying to need in either every jenkinsfile, or to need a global pipeline library for.
Not sure if "command" is an appropriate name but could really be anything.
It may also be helpful to some to be able to call specific programs/shells etc with arguments which could use a named argument form:
or with arguments passed as an array which is seen in other applications: