Hi,

I'm attempting to connect to a remote machine using sshpass.  The script that 
is being run is exiting with "exit 0" but the exit code that is returned to the 
Jenkins "Execute shell" is "255".  I think CLish is making this task 
challenging.

Can I ask Jenkins to accept a return code of 255 for this single job?

Here's a quick example for those who are curious.  The machine has a CLish 
shell.

Connect and drop to bash shell in single command:

$ sshpass -p 'password' ssh -t user@172.16.5.4 'shell'
user@172.16.5.4:~$ exit 0
exit
Connection to 172.16.5.4 closed.

Back on my machine, check the exit code:

$ echo $?
255

Manually drop to shell on the remote machine with CLish:

$ sshpass -p 'password' ssh user@172.16.5.4
CLishPrompt> shell
$ exit
exit
CLishPrompt> exit
Connection to 172.16.5.4 closed.

Check the exit code back on my machine:

$ echo $?
0

I don't know why I am getting an exit status of 255 but I need to issue the 
'shell' command in a single line and am not sure how else to accomplish what 
I'm trying to accomplish in the first example without using 'shell'.  
Therefore, I'd like Jenkins to ignore the fact that the return code is 255 for 
this one job.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to