I've suggested you run a Groovy script on your agent using the Groovy CLI, not to include your groovy code in your pipeline, if you make a load it is the same that put the code in the Jenkinsfile (more or less),
-- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4688ec7e-acaf-43b5-a265-0ed587813dc9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.