users@glassfish.java.net

hudson, glassfish, asadmin and ssh

From: Timothy Loginov <tloginov_at_gmail.com>
Date: Fri, 5 Dec 2008 00:32:39 +0300

Hello everybody,

I'm kind a newbie in Hudson stuff, but I already have pretty complex request:

I have Hudson that builds a number of projects, which should be deployed
to the other servers that run Glassfish.

So, for example, I have a project set up in Hudson, which, upon
successful build,
should execute a shell script on the remote server.

I have set up certificates for direct access to this server and have a
command like:
--
ssh user_at_remotehost "/path/deploy.sh"
--
This almost works until I start using "asadmin" Glassfish utility in
"deploy.sh" - it
fails without explanations, saying (note - all other shell stuff works fine):
--
CLI137 Command ANY_COMMAND_I_USE failed
--
Having played with rights a little I figured out that if I run:
 ssh user_at_remotehost "/path/deploy.sh"
from console on server that runs Hudson, will fail too with "asadmin"
(all other shell stuff works fine here too), unless I set "-t" param:
 ssh -t user_at_remotehost "/path/deploy.sh"
but when I try to add this param to Hudson it says something about stdin and
command fails again.
Does someone do things like that? Any ideas?
In advance: I can be more specific with error codes and messages tomorrow.
--
WBR,
Tim