1
0
mirror of https://github.com/0rangebananaspy/authelia.git synced 2024-09-14 22:47:21 +07:00
authelia/.buildkite/hooks/pre-exit
Amir Zarrinkafsh 4d3efb0da3
ci(buildkite): clean /tmp at the conclusion of each job ()
* ci(buildkite): clean /tmp at the conclusion of each job

* fix: cleanup with sudo to remove 000 perm files
2022-04-29 12:23:51 +10:00

11 lines
335 B
Bash
Executable File

#!/usr/bin/env bash
set +u
if [[ ! "${BUILDKITE_COMMAND}" =~ "buildkite-agent pipeline upload" ]] && \
[[ "${BUILDKITE_AGENT_META_DATA_CLEANBUILD}" != "false" ]]; then
echo "--- :docker: Clean environment"
docker system prune -af --volumes
fi
sudo find /tmp/ ! -wholename "/tmp/" ! -name "buildkite*" -type d,f -exec rm -rf {} +