(was: Groovy postbuild interrupts postbuild execution in a template if the job has failed.)
All post build steps in a project are expected to be performed even when any of them failed.
E.g. emails should be sent even if other post build steps failed.
Jenkins core (e.g. freestyle projects) performs all post build steps using AbstractBuild.AbstractRunner#performAllBuildSteps
(They are codes of Jenkins 1.420 which template-project plugin targets)
I'm using "Use publishers from another projects" and I have several post build steps in a template. If the build fails, post build steps in the template are executed until Groovy postbuild has finished and then I get:
Build step 'Use publishers from another project' marked build as failure
After that it will continue as normal running the remaining post build steps in the job, but discards rest of the post build steps in my template.
If I remove my Groovy script from my template or the job succeeds, everything works OK. Same thing if I don't use a template.