ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Robert H - MWT" <Anderson.Rob...@menlolog.com>
Subject RE: Need advice from somebody who uses (or avoids) SSHExec
Date Tue, 22 Apr 2003 22:45:27 GMT
This task is relatively new and I would be surprised to hear that it is
widely used at this point. I use the sshexec and scp tasks for deploying
builds to remote servers also. Unfortunately, at this time, the failonerror
does not depend on the exit code of the command run remotely. In other
words, you will see a "BUILD SUCCESSFULL" if you can connect, whether or not
the command was successfull. You will see a "BUILD FAILED" if you cannot
connect. For example, if you misspell the server name or username, the task
will fail and depending on the failonerror attribute you will see either
"BUILD SUCCESSFULL" or "BUILD FAILED". I realize that this is a major issue
and I have logged a bug in bugzilla (bug # 19237). 

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19237

I will try to look into this soon. You may be interested in the rant (remote
ant) project. I have never used it, but I beleive it will capture errors
from the remote host. Check it out...

http://sourceforge.net/projects/remoteant

-Rob Anderson


-----Original Message-----
From: Matt Reason [mailto:matt.reason@movielink.com]
Sent: Tuesday, April 22, 2003 2:52 PM
To: Ant Mailing List (E-mail)
Subject: Need advice from somebody who uses (or avoids) SSHExec


 
Hi there,
 
I assume this is a fairly well used task - unless you prefer to have a
shell do all the remote commandeering.  What is the consensus on this?
Does ANT even have any business doing SSH?
 
Here is my setup:
I would like to keep my entire build in ANT - just for the sake of
cleanliness.  I have a central build server with a main build.xml and it
deploys fresh code out to a ring of about 5 similar but different QA
servers.  Each of those QA servers have a build.xml of their own.  I
would like the central build.xml file to kick off ant on all the QA
servers using SSHExec.
I have set up SSHExec and in my preliminary testing I'm wondering why is
there no way to make it fail on error? The documentation says the best
it'll do is warn you (shouldn't that be called warnonerrror?). There
doesn't seem to be a way to communicate an exit status from the remote
command to the local build process. The only way I can think of is to
have the remote build.xml wrapped in a shell that will either echo
"PASS" or "FAIL" into an OutputProperty. But then that'd be the only
verbosity you could get from the shell... Seems like a bit of a hack
too.

To me this is very important b/c I don't want the build to send off an
email saying the build is done and the servers are up when indeed they
are not.   I assume a lot of people have the same job I do, but I never
hear people talking about the deployment process... best practices /
theory / practical knowledge / etc.

Any feedback or thoughts would be welcome.

Matt


Mime
View raw message