diff options
Diffstat (limited to 'jenkins-helpers.sh')
-rw-r--r-- | jenkins-helpers.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh index 26151090..ff3f2035 100644 --- a/jenkins-helpers.sh +++ b/jenkins-helpers.sh @@ -1243,6 +1243,7 @@ finishing at step \"$run_step_finish_at\"" run_step_top_artifacts=$(cd "$run_step_top_artifacts"; pwd) rm -f $run_step_top_artifacts/console.log + rm -f $run_step_top_artifacts/console.log.xz rm -f $run_step_top_artifacts/results } @@ -1256,8 +1257,7 @@ finishing at step \"$run_step_finish_at\"" # Step commands have $run_step_artifacts pointing to artifact directory # for current step. # 3. logging -- dump stdout and and stderr output of step commands -# into per-step console.log files, and, also, into the top-level -# console.log file. +# into per-step console.log files # 4. result handling -- output provided success result to artifacts/results # for successful steps. Special value "x" means to let the step itself # update artifacts/results. Results are written to artifacts/results @@ -1339,7 +1339,7 @@ run_step () local log_url="" if [ -v BUILD_URL ]; then # Link to jenkins, valid once the job has finished - log_url="(${BUILD_URL}artifact/artifacts/$full_step_name/console.log)" + log_url="(${BUILD_URL}artifact/artifacts/$full_step_name/console.log.xz)" fi rm -rf "$run_step_artifacts" @@ -1347,8 +1347,9 @@ run_step () echo "RUNNING ${step[*]}; see tail -f $run_step_artifacts/console.log" $log_url run_step_status=0 - eval "if $run_step_verbose; then set -x; else set +x; fi; ${step[*]}" 2>&1 | ts -s "%T" | tee -a $run_step_top_artifacts/console.log > $run_step_artifacts/console.log & + eval "if $run_step_verbose; then set -x; else set +x; fi; ${step[*]}" 2>&1 | ts -s "%T" > $run_step_artifacts/console.log & wait $! || run_step_status=$? + xz $run_step_artifacts/console.log case "$run_step_status:$run_mode" in 0:*) ;; |