fix(ci): aggressive buildkit container removal and system prune with volumes to solve ENOSPC
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 22s
Build & Deploy / 🧪 QA (push) Successful in 1m11s
Build & Deploy / 🏗️ Build (push) Failing after 2m45s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 22s
Build & Deploy / 🧪 QA (push) Successful in 1m11s
Build & Deploy / 🏗️ Build (push) Failing after 2m45s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
This commit is contained in:
@@ -64,11 +64,19 @@ jobs:
|
|||||||
echo "Pruning Buildkit inside container: $container"
|
echo "Pruning Buildkit inside container: $container"
|
||||||
docker exec -i "$container" buildctl prune --all || true
|
docker exec -i "$container" buildctl prune --all || true
|
||||||
done
|
done
|
||||||
|
echo "Removing buildkit builder containers to clear overlay storage..."
|
||||||
|
containers=$(docker ps -a --filter "name=buildx_buildkit_builder" -q)
|
||||||
|
if [ -n "$containers" ]; then
|
||||||
|
docker rm -f $containers || true
|
||||||
|
fi
|
||||||
|
echo "=== Disk Space Usage Breakdown under Host Volume ==="
|
||||||
|
docker run --rm -v /:/host-root alpine du -sh /host-root/mnt/HC_Volume_104796416/* | sort -rh | head -n 20 || true
|
||||||
echo "Purging old build layers, unused volumes and images..."
|
echo "Purging old build layers, unused volumes and images..."
|
||||||
docker builder prune -a -f || true
|
docker builder prune -a -f || true
|
||||||
docker volume prune -f || true
|
docker volume prune -f || true
|
||||||
docker system prune -a -f || true
|
docker system prune -a -f --volumes || true
|
||||||
echo "=== System Disk Usage After Prune ==="
|
echo "=== System Disk Usage After Prune ==="
|
||||||
|
docker run --rm -v /:/host-root alpine df -h || true
|
||||||
df -h || true
|
df -h || true
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|||||||
Reference in New Issue
Block a user