Re: Abort a job as soon as an error message appears in the console output

2015-11-16 Thread Victor Martinez
Hi again, Jenkins run the above shebang by default: - https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/Shell.java#L85 But if you run scripts and other scripts without trapping those errors then IMO the root cause is basically in the scripts itself, so i

Re: Abort a job as soon as an error message appears in the console output

2015-11-16 Thread Patricia Mendez Lorenzo
Thanks a lot Victor for your answer. In any case, this is what we would like to avoid. At a certain point, when the chain of scripts is too long, we will certainly forget to include the -e option. This is not a robust approach. I was wondering in Jenkins is able to do it as toolkit, other tool

Abort a job as soon as an error message appears in the console output

2015-11-13 Thread Victor Martinez
Hi, If I understood correctly you could add the below shebang in each script file #!/bin/bash -xe Then in case of any errors of those children scripts will be trapped accordingly. you might need to review whether you use any traps I hope it helps Cheers -- You received this message because

Abort a job as soon as an error message appears in the console output

2015-11-13 Thread Patricia Mendez Lorenzo
Dear all, i have a set of jenkins jobs with some bash code included in the "Execute shell" window. The primary bash execution calls some scripts that at the same time call some other scripts... this means; there is a set of children and subchildren and sub-subchildren even. I would like to ensure