FWIW at this point, this kind of demonstrates my point: I think I kind of want a library to build a CI system. Not some piece of software I have to run somewhere (as root, probably), which may enable me do to what I want.
Why hasn't anyone developed a CI-orcherstration library yet? Is it actually a difficult problem?
This means that everything needs to be serializable, and that in reality you are not really executing groovy statements, but rather passing continuations.
This is a reason why you have @NonCPS annotiation, that allows you to opt-out of that behavior.