I am trying to read old jenkins build environment variables (to extract the downstream jobs) using groovy script. I am currently using
build.getEnvVars()
But getting deprecated warning. Could someone tell me what's the best method to read these old build environment variables?