Skip to content

Chore: Refactor CI and add auto cache cleanup mechanisms

Xiao Pan requested to merge xp/ci_clean_up_bazel_cache into main
  1. Refactor the Jenkins file to remove parallel stages.
  2. Implement Bazel cache cleanup mechanisms to manage cache size effectively:
  • Clean up Bazel caches when the cache size exceeds 30 GB.
  • Due to limitations in Bazel, it is not possible to clean up cache based on time.
  • Bazel does not provide a built-in method to identify time-based cache contents.
  • Searching by modified date is ineffective because the downloaded artifacts are shared between builds and their modified dates are not updated.
  • Partial cache removal is avoided to prevent broken caches.
  • The implemented approach is to completely remove all caches (similar to bazel clean --expunge) when the cache size threshold is exceeded. This ensures a clean cache environment.
Edited by Xiao Pan

Merge request reports