summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jenkins-helpers.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh
index e77b07e0..21417d96 100644
--- a/jenkins-helpers.sh
+++ b/jenkins-helpers.sh
@@ -1251,12 +1251,20 @@ run_step ()
esac
if ! $skip; then
- run_step_artifacts=$run_step_top_artifacts/$(printf "%02d" $run_step_count)-$pretty_step
+ local full_step_name
+ full_step_name=$(printf "%02d" $run_step_count)-$pretty_step
+ # This is used when accessing the workspace
+ run_step_artifacts=$run_step_top_artifacts/$full_step_name
+ 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)"
+ fi
rm -rf "$run_step_artifacts"
mkdir -p "$run_step_artifacts"
- echo "RUNNING ${step[*]}; see tail -f $run_step_artifacts/console.log"
+ 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 &
wait $! || run_step_status=$?