diff --git a/build/BUILD.bazel b/build/BUILD.bazel index 27c190841a7d..b83f4f487a50 100644 --- a/build/BUILD.bazel +++ b/build/BUILD.bazel @@ -37,6 +37,28 @@ kong_rules_group( visibility = ["//visibility:public"], ) +# Hermetic targets for caching +# For local development, you could run the following command to warm up the cache: +# bazel build //build:cacheable-targets --remote_cache= +# And then run another build command with the same remote cache server to use the cache. +# bazel build //:kong --remote_cache= --remote_upload_local_results=false +# The `--remote_upload_local_results=false` flag is used to avoid uploading +# the build results to the remote cache server, this is to avoid polluting the cache. +kong_rules_group( + name = "cacheable-targets", + propagates = [ + "@openssl", + "@libexpat", + "@atc_router", + "@simdjson_ffi", + "@snappy", + "@brotli", + "@pcre", + "@openresty", + ], + visibility = ["//visibility:public"], +) + # OpenResty kong_install(