Force Build Failure through shell command

2,459 views
Skip to first unread message

scherko

unread,
Apr 28, 2011, 10:56:22 AM4/28/11
to jenkins...@googlegroups.com
Hi there.

Is there a proper way to force a build to fail during executing some
shell-code?
Some additional error messages might be helpful.

Greets

--
View this message in context: http://jenkins.361315.n4.nabble.com/Force-Build-Failure-through-shell-command-tp3481259p3481259.html
Sent from the Jenkins users mailing list archive at Nabble.com.

Rob Petti

unread,
Apr 28, 2011, 11:11:02 AM4/28/11
to jenkins...@googlegroups.com
Jenkins looks at the exit code, so "exit 1" or something similar would be sufficient to trigger a failure. If you need additional log output, then just add some simple error handling and log output to your script.

徐帅

unread,
Jan 22, 2015, 1:58:49 AM1/22/15
to jenkins...@googlegroups.com
Your method is helpful for me,i use python script sys.exit(1) ! 

在 2011年4月28日星期四 UTC+8下午11:11:02,Rob Petti写道:
Reply all
Reply to author
Forward
0 new messages