[Anthill] Killing the build process...
Eric Minick
eric at urbancode.com
Fri Apr 15 09:48:19 CDT 2005
Jeevan and Robert,
Another work intensive option would be to modify the Anthill code to add
an abort button. As of 1.8 the old execution library is swapped out for
a modified version of the Ant execution library. I'll get the source
code for that up on the website soon. CVS access might take a little
longer to arrange.
Our version of the library maintains a list of which external processes
are being run by any given thread. So you could come in and say, "give
me all the processes for the BuildDaemon" kill those processes and the
build will be violently brought to an end.
Here's what this might look like:
import org.apache.commons.execute.ProcessThreadRegistry;
Process[] processArray =
ProcessThreadRegistry.getInstance().getProcessArrayForThread(daemonExecutingBuild);
// Make a good faith effort to kill hung processes and cleanup
resources.
for (int i = 0; i < processArray.length; i++) {
try {
processArray[i].destroy();
processArray[i].exitValue();
}
catch (Exception e) {
log.error("Problem killing build.", e);
throw new AnthillBuildException(e);
}
}
Cheers,
Eric
Robert E Dobbins wrote:
> "Pause / Flush" Queue were not intended to stop the active build.
>
> A little work but you could run an ant parallel task that scans the
> log and upon finding an error could terminate. Then the normal build
> fail would flush the process. Make sure you use a semaphore or other
> device so that the scanner would know when other thread was done and
> would exit normally.
>
>
> Thanks,
>
> Robert E. Dobbins
> IBM Global Services
> Systems Management Integration Professional
> Web Hosting
>
> /
> /
> Inactive hide details for "Jeevan_Sunkersett"
> <Jeevan_Sunkersett at satyam.com>"Jeevan_Sunkersett"
> <Jeevan_Sunkersett at satyam.com>
>
>
> *"Jeevan_Sunkersett"
> <Jeevan_Sunkersett at satyam.com>*
> Sent by: anthill-bounces at lists.urbancode.com
>
> 04/14/2005 04:30 AM
> Please respond to
> Anthill user list
>
>
>
> To
>
> <anthill at lists.urbancode.com>
>
> cc
>
>
> Subject
>
> [Anthill] Killing the build process...
>
>
>
>
> Hi,
>
> I have configured our projects and do an integration build using
> AntHill OS.
> The build process, uses a "stopped schedule" and is initiated whenever
> desired.
>
> Our build process (cvs-checkout, compile-all and test-all) takes about
> 82 minutes.
>
> Developers wish for a way to terminate a build midway, if they notice
> an error in the log file being generated
> (instead of waiting the full 82 minutes).
>
> However the Pause/ Flush queue DOES NOT STOP the build.
>
> The practice followed now,
> Is to login as root,
> Do a ps –axf | grep ant
> And then a kill -9 on the pid found above
>
> Any other cleaner solution?
> Anthill is deployed on a Linux OS.
>
> G1
>
> DISCLAIMER:
> This email (including any attachments) is intended for the sole use of
> the intended recipient/s and may contain material that is CONFIDENTIAL
> AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or
> copying or distribution or forwarding of any or all of the contents in
> this message is STRICTLY PROHIBITED. If you are not the intended
> recipient, please contact the sender by email and delete all copies;
> your cooperation in this regard is
> appreciated.._______________________________________________
> Anthill mailing list
> Anthill at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Anthill mailing list
>Anthill at lists.urbancode.com
>http://lists.urbancode.com/mailman/listinfo/anthill
>
>
More information about the Anthill
mailing list