summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Alfonsi <laurent.alfonsi@linaro.org>2022-07-31 11:45:19 +0200
committerLaurent Alfonsi <laurent.alfonsi@linaro.org>2022-07-31 11:46:36 +0200
commit5a5dbead26b19890c31fd0c5d7fa61a1c49b3f7e (patch)
treece8c03fd8fbddffd0f6fb5642326227fee750bf9
parent21ba887e3d95d7404752085f6aabb3187040a604 (diff)
tcwg-report-stale-rr-jobs.sh: double timeslot for relaease jobs
+ automatic analysis detects ssh-agent errors Change-Id: I736ca187948d70d7d01da31d8a7480060b195ae2
-rwxr-xr-xtcwg-report-stale-rr-jobs.sh28
1 files changed, 19 insertions, 9 deletions
diff --git a/tcwg-report-stale-rr-jobs.sh b/tcwg-report-stale-rr-jobs.sh
index c1ac4da1..67bc2ffa 100755
--- a/tcwg-report-stale-rr-jobs.sh
+++ b/tcwg-report-stale-rr-jobs.sh
@@ -28,6 +28,7 @@ process_git_url ()
(
set -euf -o pipefail
local refs_url="$1"
+ local days_for_master days_for_release days_limit
# Initialize base-artifacts repo (by cloning its "empty" branch).
refs_repo=$(basename "$refs_url" .git)
@@ -35,6 +36,9 @@ process_git_url ()
>/dev/null 2>&1
git -C "$refs_repo" reset --hard >/dev/null 2>&1
+ days_for_master="$days"
+ days_for_release="$((days+days))"
+
# Walk through all commits of all tcwg_bmk* branches and mark results
# referenced in those results with "used_by" file.
while IFS= read -r ref; do
@@ -42,7 +46,12 @@ process_git_url ()
git -C "$refs_repo" fetch -q origin "+$ref:$dst_ref" >/dev/null 2>&1
commit_stamp=$(git -C "$refs_repo" show --no-patch --pretty=%ct "$dst_ref")
days_ago=$((($(date +%s) - $commit_stamp) / (24 * 3600)))
- if [ $days_ago -gt $days ]; then
+ if [[ $ref =~ -release- ]]; then
+ days_limit=$days_for_release
+ else
+ days_limit=$days_for_master
+ fi
+ if [ "$days_ago" -gt "$days_limit" ]; then
if $human; then
echo "$refs_repo: ${ref#$refs_prefix}: last updated $days_ago days ago"
else
@@ -282,14 +291,15 @@ classify_gcc_boostrap_timeout ()
verbose " - classify_gcc_boostrap_timeout()"
classify grep __toppage__ "tcwg_gcc_bootstrap" "ERROR (bootstrap timeout)"
}
-classify_build_timeout ()
+
+classify_analyse_console ()
{
if [ ! -z "${test['diag']}" ]; then return; fi
- verbose " - classify_build_timeout()"
+ verbose " - classify_analyse_console()"
classify grep lastBuild/console "Build timed out" "ERROR (build timeout)"
+ classify grep lastBuild/console "FATAL: \[ssh-agent\] Unable to start agent" "ERROR (cannot start ssh-agent)"
}
-
classify_analyse_result_file ()
{
local stage
@@ -398,15 +408,15 @@ classify_failures ()
# Classify
classify_polling_error
+
+ # is disabled ?
classify_project_disabled
-
- get_last_interesting_run
- classify_build_timeout
+ # deeper analyse
+ get_last_interesting_run
+ classify_analyse_console
classify_analyse_result_file
- set +x
-
printf "%-35s | %-13s | %-16s | %-16s | %-16s %-50s\n" "${test['diag']}" "${test['last_updated']}" "${test['poll_date']}" "${test['run_date']}" "[${test['gitproject']}]" "$jenkins_base_url/job/${test['jkproject']}/${test['run_nb']}"
done < $stale_jobs_file