Skip to content

Commit

Permalink
Update reclaim disk space script
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes #14554
  • Loading branch information
mcmilk authored Mar 1, 2023
1 parent 3a7c351 commit 0f9ed58
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/scripts/reclaim_disk_space.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/* \
Expand All @@ -18,3 +18,6 @@ sudo systemd-run rm -rf \
/var/lib/gems \
/var/lib/mysql \
/var/lib/snapd

# trim the cleaned space
sudo fstrim /

0 comments on commit 0f9ed58

Please sign in to comment.