I am able to execute Groovy scripts on slave JVM using the slave's groovy console offered by Jenkins. (e.g) println System.getenv("PATH")
prints the value of path variable of the slave node
when I made the same call in my Jenkins job which is executed on slave, using build action execute system groovy script It creates the workspace on slave but groovy script is executed in server JVM (e.g) println System.getenv("PATH")
prints the value of path variable at the Master's Node
Is there any way of executing my groovy scripts on client JVM in Jenkins job without installing groovy on slave node?