I'm a relative n00b to Jenkins but if I were you, I wouldn't run your
application on the same tomcat instance.  You are making your life harder.
 Why not create another instance for deploying/testing the app?  You can
run multiple versions and/or instances of tomcat on different ports, run
one in a VM or on another system.

Regardless, tomcat can undeploy/redeploy an application without stopping.
 There is an ant Task for tomcat to allow deploying applications via the
management API that do not require stopping or starting tomcat or affecting
jenkins....unless it blows up or consumes memory, in which case it will
mess up all applications running in that instance and kill your build/test
processes anyway...so again, I wouldn't do it that way.

Also if you were using Maven to build, there is a plugin that allows you to
start a new tomcat instance for testing then shuts it down afterward.  I've
not used it though.  There could be something similar for ANT.

On Mon, Aug 6, 2012 at 10:20 AM, Pedro Perez <guerr...@gmail.com> wrote:

> Hello,
>
> I'm new to Jenkins and so far I love it...but I have an issue integrating
> with Tomcat. I have Jenkins stopping and starting Tomcat via ant script.
> However I've found that Jenkins process-killer shuts down tomcat for me
> after it's finished. I've read
> https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller and have
> tried to disable it, however I run Jenkins through Tomcat, and I'm not sure
> how to disable the process killer when Jenkins is run as a simple web app
> on Tomcat 7. I tried to simply override the BUILD_ID variable like this:
>
> $BUILD_ID=dontKillMe
>
> to no avail. Even if that worked though, I'm wondering if there is a
> "cleaner" solution to starting and stopping Tomcat with Jenkins. When using
> ANT to start/stop it usually works, but not 100% every time. I've read
> about a tomcat plugin for Jenkins, but I think it doesn't stop/start Tomcat
> in the order I need it...basically my build script does a code checkout,
> compile, stop tomcat, replace war, start tomcat, run tests against newly
> deployed web app.
>
> Does anybody know the "correct" way to interact with Tomcat and Jenkins?
>
> Thanks
> Pedro
>



-- 
Jeff Vincent
predato...@gmail.com
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
I ♥ DropBox <http://db.tt/9O6LfBX> !!

Reply via email to