debug(context.getListener().getLogger(), "Setting up sandbox for pre-send script");
cc.addCompilationCustomizers(new SandboxTransformer());
sandbox = new ScriptSandbox();
}
Binding binding = new Binding();
binding.setVariable("build", context.getBuild());
binding.setVariable("msg", msg);
binding.setVariable("logger", context.getListener().getLogger());
binding.setVariable("cancel", cancel);
binding.setVariable("trigger", context.getTrigger());
binding.setVariable("triggered", ImmutableMultimap.copyOf(context.getTriggered()));
GroovyShell shell = new GroovyShell(cl, binding, cc);
StringWriter out = new StringWriter();
PrintWriter pw = new PrintWriter(out);