I am trying to get the current workspace of my Jenkins build using a Groovy pipeline script:
node(\'master\') { // PULL IN ENVIRONMENT VARIABLES // J
In Jenkins pipeline script, I am using
targetDir = workspace
Works perfect for me. No need to use ${WORKSPACE}