how to run cleanup script after failed build

View: New views
2 Messages — Rating Filter:   Alert me  

how to run cleanup script after failed build

by Sandra Madden :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.
 
Thanks,
Sandra

Re: how to run cleanup script after failed build

by kohsuke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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/


smime.p7s (4K) Download Attachment
LightInTheBox - Buy quality products at wholesale price!