Q:

How to fetch parent directory of {env.WORKSPACE } in jenkins pipeline

Hi have a requirement to fetch the path of the parent directory of the work space. How can do that?

A:

You can use ${WORKSPACE}/.. for linux or %WORKSPACE%/.. for Windows.
If you want to fetch it to variable, you can run something like:
path=$(cd ${WORKSPACE}/.. && pwd)

