Re: I need to fail jenkins job if any linux command return error message

2022-11-22 Thread Praju
Thank you all , it is working for me On Tuesday, November 22, 2022 at 7:28:29 PM UTC+5:30 db...@cloudbees.com wrote: > On Tue, Nov 22, 2022 at 2:54 PM Praju wrote: > >> Hi , >> The above one I am taking as example but actual configuration is: >> < python_file> -D&1 2 | te

Re: I need to fail jenkins job if any linux command return error message

2022-11-22 Thread 'Daniel Beck' via Jenkins Users
On Tue, Nov 22, 2022 at 2:54 PM Praju wrote: > Hi , > The above one I am taking as example but actual configuration is: > < python_file> -D&1 2 | tee gen.file.log > above command return "ValueError: No JSON object could be decoded" > but the job build status is showing suc

Re: I need to fail jenkins job if any linux command return error message

2022-11-22 Thread Praju
Hi , The above one I am taking as example but actual configuration is: < python_file> -D&1 2 | tee gen.file.log above command return "ValueError: No JSON object could be decoded" but the job build status is showing success Thanks On Tuesday, November 22, 2022 at 6:54:51 PM

Re: I need to fail jenkins job if any linux command return error message

2022-11-22 Thread 'Dirk Heinrichs' via Jenkins Users
Am Dienstag, dem 22.11.2022 um 05:11 -0800 schrieb Praju: echo ${var} ( Note : I am not defined var) echo NEVER fails. If ${var} is not defined, echo will output an empty string, so you'll see an empty new line in your build's log. If you want it to fail, you'd need to test whether the

Re: I need to fail jenkins job if any linux command return error message

2022-11-22 Thread 'Daniel Beck' via Jenkins Users
On Tue, Nov 22, 2022 at 2:11 PM Praju wrote: > Hi, > below is my configuration: > > echo "welcome" > echo ${var} ( Note : I am not defined var) > echo "hello" > > expected output status: failure > > output: > > + echo welcome > welcome >

Re: I need to fail jenkins job if any linux command return error message

2022-11-22 Thread Praju
Hi, below is my configuration: echo "welcome" echo ${var} ( Note : I am not defined var) echo "hello" expected output status: failure output: + echo welcome welcome + echo + echo hello hello

Re: I need to fail jenkins job if any linux command return error message

2022-11-22 Thread 'Dirk Heinrichs' via Jenkins Users
Am Dienstag, dem 22.11.2022 um 21:01 +0800 schrieb kakamai...@gmail.com: throw exception in groovy The question is about Linux commands, not Groovy. Bye... Dirk -- Dirk Heinrichs Senior Systems Engineer, Delivery Pipeline OpenText ™ Discovery | Recommind Phone: +

Re: I need to fail jenkins job if any linux command return error message

2022-11-22 Thread kakamain99
-- 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. To view this discussion on the web visit https://groups.google.com

Re: I need to fail jenkins job if any linux command return error message

2022-11-22 Thread 'Dirk Heinrichs' via Jenkins Users
Am Dienstag, dem 22.11.2022 um 03:47 -0800 schrieb Praju: I need to fail jenkins job if any linux command return error message , could any one help one this By default, Jenkins runs "Execute Shell" steps with "/bin/sh -e -x". Due to "-e", the step will fail if any of its commands fail. And if t

Re: I need to fail jenkins job if any linux command return error message

2022-11-22 Thread Alex Earl
This is the default for Jenkins, if a command exits with a non-zero exit code, then the job should already fail. On Tue, Nov 22, 2022 at 5:41 AM Praju wrote: > Hi , > I need to fail jenkins job if any linux command return error message , > could any one help one this > > Thank you > > -- > You r