2020-06-18 07:49:13 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-03-19 05:15:54 +00:00
|
|
|
|
|
|
|
set +u
|
|
|
|
|
2022-03-30 00:24:50 +00:00
|
|
|
if [[ ! "${BUILDKITE_COMMAND}" =~ "buildkite-agent pipeline upload" ]] && \
|
|
|
|
[[ "${BUILDKITE_AGENT_META_DATA_CLEANBUILD}" != "false" ]]; then
|
2020-04-09 04:46:04 +00:00
|
|
|
echo "--- :docker: Clean environment"
|
|
|
|
docker system prune -af --volumes
|
2022-04-29 02:23:51 +00:00
|
|
|
fi
|
|
|
|
|
2022-05-10 07:57:04 +00:00
|
|
|
sudo find /tmp/ ! -wholename "/tmp/" ! -name "buildkite*" ! -name "job-env-*" -type d,f -exec rm -rf {} +
|