Sandra Madden wrote:
> Hi,
>
> Is it possible to detect that the build failed and then automatically
> run a cleanup script to revert the previous changes? E.g. we are
> automatically checking out files to update version resources, release
> notes etc. In case the build fails, I want the checkouts to be reverted.
In your specific case, a clean check out at every build might do what
you need (although it's slower, granted.)
In a general case, this would require a plugin. It basically amounts to
writing a Publisher that delegates to the Shell class, so it should be
pretty easy to write one.
Now, my canonical question is, would you be interested in doing that?
(Otherwise, please file an RFE.)
--
Kohsuke Kawaguchi
Sun Microsystems
http://weblogs.java.net/blog/kohsuke/