diff options
author | Laurent Alfonsi <laurent.alfonsi@linaro.org> | 2022-09-21 15:46:40 +0200 |
---|---|---|
committer | Laurent Alfonsi <laurent.alfonsi@linaro.org> | 2022-09-22 09:16:46 +0000 |
commit | 0fbbe2bf133bf76663717da32a21fa605b4d37d0 (patch) | |
tree | 2b815e15e96d5f886a938217fe1c5376cd2428a5 | |
parent | d2f67279966e117ada639f03b6b68b597053c42d (diff) |
tcwg-report-stale-rr-jobs.sh: Use a reference-if-able for base-artifact git repo
Change-Id: I2de29f15b0d6784151ada05ad805034bca79c526
-rwxr-xr-x | tcwg-report-stale-rr-jobs.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tcwg-report-stale-rr-jobs.sh b/tcwg-report-stale-rr-jobs.sh index 92b97fe2..5bbb7280 100755 --- a/tcwg-report-stale-rr-jobs.sh +++ b/tcwg-report-stale-rr-jobs.sh @@ -20,6 +20,7 @@ only="${only-false}" keep_tmp="${keep_tmp-false}" tmpdir="${tmpdir-""}" +output=$(realpath $output) if [ $output != "/dev/null" ]; then rm -f $output fi @@ -58,7 +59,8 @@ process_all_artifacts () local days_for_master days_for_release days_limit # Initialize base-artifacts repo (by cloning its "empty" branch). - clone_or_update_repo "base-artifacts" empty "$baseartifacts_url.git" + clone_or_update_repo "base-artifacts" empty "$baseartifacts_url.git" \ + "/home/shared/git/base-artifacts" git -C "base-artifacts" reset -q --hard days_for_master="$days" @@ -73,8 +75,7 @@ process_all_artifacts () fi dst_ref="refs/remotes/origin/${ref#refs/heads/}" - git -C "base-artifacts" fetch -q origin "+$ref:$dst_ref" - git -C "base-artifacts" checkout -q FETCH_HEAD + git -C "base-artifacts" checkout -q $dst_ref # -- get components for this project components="" @@ -84,7 +85,7 @@ process_all_artifacts () # 100fd17 round-robin.sh: Fix "git rev-parse" of short histories commit_stamp=1660557250 days_ago=$((($(date +%s) - $commit_stamp) / (24 * 3600))) - echo "all: ${ref#$refs_prefix}: No successful run since $days_ago days" |& tee -a $output + echo "*all*: ${ref#$refs_prefix}: No successful run since $days_ago days" |& tee -a $output continue; fi while read -e c; do @@ -120,6 +121,7 @@ process_all_artifacts () done < <(git ls-remote "$baseartifacts_url" "${refs_prefix}*" | awk '{ print $2 }') ) + git -C "base-artifacts" gc } @@ -317,7 +319,7 @@ get_last_interesting_run () for r in {1..8}; do get_run_title_and_status ${test['run_nb']} if [[ "${test['run_title']}" =~ $gitprojectshort ]] || - [ $gitprojectshort == "all" ]; then + [ $gitprojectshort == "*all*" ]; then test['last_run']=${test['run_nb']} verbose " > ${test['run_nb']}" return @@ -505,7 +507,7 @@ classify_failures () continue fi - if [ $verbose == "all" ]; then set -x; fi + if [ $verbose == "*all*" ]; then set -x; fi # Check if project exist before getting the infos classify_project_deleted |