Hi,
I’ve been attempting to set an environment variable using groovy. So far the code I have is:
import hudson.model.*
import hudson.maven.*
import hudson.tasks.*
for(item in Hudson.instance.items) {
item.buildWrappers.each{
if (it instanceof hudson.plugins.setenv.SetEnvBuildWrapper){
println("Instance of hudson.plugins.setenv.SetEnvBuildWrapper ")
// do something
}
}
}
But the buildwrapper is never recognised as an instance of SetEnvBuildWrapper. Does anyone know the correct syntax to getting this working?
Thanks,
Andy.