I am trying to get the current workspace of my Jenkins build using a Groovy pipeline script:
node(\'master\') { // PULL IN ENVIRONMENT VARIABLES // J
This is where you can find the answer in the job-dsl-plugin code.
Basically you can do something like this:
readFileFromWorkspace('src/main/groovy/com/groovy/jenkins/scripts/enable_safehtml.groovy')