Re: Pipeline: The sh step does not show all output

2019-05-31 Thread Sverre Moe
Marvelous, thanks, I'll try that. fredag 31. mai 2019 18.20.28 UTC+2 skrev Daniel Saier følgende: > > You can also use the tee step > , > > which automatically propagates the return codes of the steps inside o

Re: Pipeline: The sh step does not show all output

2019-05-31 Thread Daniel Saier
You can also use the tee step , which automatically propagates the return codes of the steps inside of the tee. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" g

Re: Pipeline: The sh step does not show all output

2019-05-31 Thread Sverre Moe
Tried various solutions. Settled with this which works: sh(label: "Build and Package", script: """ set -o pipefail make 2>&1 | tee buildOutputFile.txt """) fredag 31. mai 2019 13.50.23 UTC+2 skrev Sverre Moe følgende: > > I did not set such a parameter > > Like so? > sh("set -o pipefail

Re: Pipeline: The sh step does not show all output

2019-05-31 Thread Sverre Moe
I did not set such a parameter Like so? sh("set -o pipefail\n commandA | commandB") fredag 31. mai 2019 13.41.50 UTC+2 skrev Baptiste Mathus følgende: > > Likely because when calling scripts this way, `set -o pipefail` is not set > maybe? > > Le ven. 31 mai 2019 à 10:06, Sverre Moe > > a écrit

Re: Pipeline: The sh step does not show all output

2019-05-31 Thread Baptiste Mathus
Likely because when calling scripts this way, `set -o pipefail` is not set maybe? Le ven. 31 mai 2019 à 10:06, Sverre Moe a écrit : > This workaround gave me some problem with failing builds. > The step no longer is marked failed when it fails. > > mandag 27. mai 2019 16.27.11 UTC+2 skrev Sverre

Re: Pipeline: The sh step does not show all output

2019-05-31 Thread Sverre Moe
This workaround gave me some problem with failing builds. The step no longer is marked failed when it fails. mandag 27. mai 2019 16.27.11 UTC+2 skrev Sverre Moe følgende: > > I got it to work by modifying my original sh step. I had to remove > returnStdout > > sh(label: "Build and Package", scrip

Re: Pipeline: The sh step does not show all output

2019-05-27 Thread Sverre Moe
I got it to work by modifying my original sh step. I had to remove returnStdout sh(label: "Build and Package", script: "make 2>&1 | tee buildOutputFile.txt" ) mandag 27. mai 2019 15.50.07 UTC+2 skrev Sverre Moe følgende: > > Not sure I understand that workaround. > > "$@" 2>&1; echo $? >&3

Re: Pipeline: The sh step does not show all output

2019-05-27 Thread Sverre Moe
Not sure I understand that workaround. "$@" 2>&1; echo $? >&3) | tee "$LOGFILE" >&4) 3>&1) | (read xs; exit $xs)) 4>&1 I tried to modify this to work with my example: final def output = sh(returnStdout: true, script: "make >&3) | tee buildOutput.txt >&4) 3>&1) | (read xs; exit $xs)) 4

Re: Pipeline: The sh step does not show all output

2019-05-27 Thread Ullrich Hafner
Would a workaround as shown in https://issues.jenkins-ci.org/browse/JENKINS-54832 help? > Am 27.05.2019 um 12:51 schrieb Sverre Moe : > > I found a way to ouput both stdout and stderr, but then I didn't get either > in Jenkins Console. > sh(

Re: Pipeline: The sh step does not show all output

2019-05-27 Thread Sverre Moe
I found a way to ouput both stdout and stderr, but then I didn't get either in Jenkins Console. sh("make 2>&1 | tee buildOutputFile.txt") mandag 27. mai 2019 12.20.17 UTC+2 skrev Sverre Moe følgende: > > The standard output from the sh-step does not show all the output: > final def output = sh(re

Pipeline: The sh step does not show all output

2019-05-27 Thread Sverre Moe
The standard output from the sh-step does not show all the output: final def output = sh(returnStdout: true, label: "Build and Package", script : "make") writeFile(file: 'buildOutputFile.txt', text: output) The Blue Ocean log output from a single Node shows all the warnings, but the output from t