I am trying to get the current workspace of my Jenkins build using a Groovy pipeline script:
node(\'master\') { // PULL IN ENVIRONMENT VARIABLES // J
There is no variable included for that yet, so you have to use shell-out-read-file method:
sh 'pwd > workspace' workspace = readFile('workspace').trim()
Or (if running on master node):
workspace = pwd()