give the groovy the build variable

https://issues.jenkins-ci.org/browse/JENKINS-24308