Also add set -e at the top of your script to make it error at the first error and not continue till the end then fail the build
From: [email protected] [mailto:[email protected]] On Behalf Of Slide Sent: Monday, November 12, 2012 12:01 PM To: [email protected] Subject: Re: Shell script to indicate failed status to Hudson - quick question If the shell script returns 0, it is determined to be a success, return anything other than 0 from the shell script to have the step considered a failure. slide On Mon, Nov 12, 2012 at 11:00 AM, Z W <[email protected]<mailto:[email protected]>> wrote: Hi All We have a simple shell script that contains deployment call to deploy ear file to an application server. However, when deployment fails, errors are spewing out to the Hudson console but script continues to run to completion and indicate a pass status on Hudson. Could experts here show us what to add in shell script so that when errors pop up, that Hudson would indicate a failed deployment and giving us the right status on the Build History ? Thanks -- Website: http://earl-of-code.com
