Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .buildkite/hooks/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# important: assumes that each agent runs a single job at a time

# ignore errors
set +e

if [[ $BUILDKITE_AGENT_META_DATA_QUEUE == "pipeline-uploader" ]]; then
echo "Skipping on `pipeline-uploader` agents"
exit 0
fi

echo "Cleaning up unused docker containers"
for id in $(docker ps --quiet); do
echo "Killing $id"
docker kill $id
done

docker system prune --all --volumes --force