From 0f9ed58f432a3eee2459b415be388a37280b885e Mon Sep 17 00:00:00 2001 From: Tino Reichardt Date: Wed, 1 Mar 2023 21:25:09 +0100 Subject: [PATCH] Update reclaim disk space script The script uses systemd-run, which does the job in background. We should take the the time and wait for the job to finish. Maybe some functional tests suffer from not really freed disk space and fail because of this. We also add some trimming in the end of the script. Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: Tino Reichardt Closes #14554 --- .github/workflows/scripts/reclaim_disk_space.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/scripts/reclaim_disk_space.sh b/.github/workflows/scripts/reclaim_disk_space.sh index cc16a90793..ed23ce31d8 100755 --- a/.github/workflows/scripts/reclaim_disk_space.sh +++ b/.github/workflows/scripts/reclaim_disk_space.sh @@ -6,7 +6,7 @@ set -eu sudo systemd-run docker system prune --force --all --volumes # remove unused software -sudo systemd-run rm -rf \ +sudo systemd-run --wait rm -rf \ "$AGENT_TOOLSDIRECTORY" \ /opt/* \ /usr/local/* \ @@ -18,3 +18,6 @@ sudo systemd-run rm -rf \ /var/lib/gems \ /var/lib/mysql \ /var/lib/snapd + +# trim the cleaned space +sudo fstrim /