From 4d3efb0da3c8f27bd2b701dabbf4a0c3df5df003 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Fri, 29 Apr 2022 12:23:51 +1000 Subject: [PATCH] ci(buildkite): clean /tmp at the conclusion of each job (#3268) * ci(buildkite): clean /tmp at the conclusion of each job * fix: cleanup with sudo to remove 000 perm files --- .buildkite/hooks/pre-exit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.buildkite/hooks/pre-exit b/.buildkite/hooks/pre-exit index 803c88a5b..01a1e20bb 100755 --- a/.buildkite/hooks/pre-exit +++ b/.buildkite/hooks/pre-exit @@ -6,4 +6,6 @@ if [[ ! "${BUILDKITE_COMMAND}" =~ "buildkite-agent pipeline upload" ]] && \ [[ "${BUILDKITE_AGENT_META_DATA_CLEANBUILD}" != "false" ]]; then echo "--- :docker: Clean environment" docker system prune -af --volumes -fi \ No newline at end of file +fi + +sudo find /tmp/ ! -wholename "/tmp/" ! -name "buildkite*" -type d,f -exec rm -rf {} + \ No newline at end of file