I'm already using this for several jobs, exactly for the use case of cleaning up nodes and collecting nodes.
Is it not working for you ?
Is post-tasks the same thing ?
This is what it looks like in a Jenkins Job Builder template: https://github.com/rdo-infra/ci-config/blob/master/jenkins/jobs/weirdo-defaults.yml#L34
David Moreau Simard
Senior Software Engineer | Openstack RDO
dmsimard = [irc, github, twitter]