From 58a71e1b2ea8a00b46dd5fe21711358597ee9d6f Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Mon, 19 Jan 2026 18:27:41 +0100 Subject: [PATCH] ci: sync time domains Some parts of the logs can use $CI_JOB_STARTED_AT, while other parts use the uptime (time since kernel boot) instead. Printing both here allows syncing them and being able to tell how much time actually elapsed between log lines. Part-of: --- .gitlab-ci/common/init-stage2.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci/common/init-stage2.sh b/.gitlab-ci/common/init-stage2.sh index 417be81297f..7173613dac6 100755 --- a/.gitlab-ci/common/init-stage2.sh +++ b/.gitlab-ci/common/init-stage2.sh @@ -54,6 +54,12 @@ echo section_switch init_stage2 "Pre-testing hardware setup" +job_time=$(get_job_seconds) +uptime=$(cut -d ' ' -f1 /proc/uptime) +echo "$(get_current_minsec) after job start == $uptime sec after kernel boot time" +printf -v uptime_rounded "%.0f" "$uptime" +echo "Kernel boot occurred $((job_time-uptime_rounded)) seconds after job start" + set -ex # Set up any devices required by the jobs