Skip to content

Commit

Permalink
chore(build): add a shortcut to build cacheable targets
Browse files Browse the repository at this point in the history
This is just for local development, engineers can easily cache
some targets during the development instead of rebuild everything.
  • Loading branch information
ADD-SP authored and fffonion committed Nov 21, 2024
1 parent 962e1f3 commit 5901c5a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions build/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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=<your_local_cache_server>
# And then run another build command with the same remote cache server to use the cache.
# bazel build //:kong --remote_cache=<your_local_cache_server> --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(
Expand Down

0 comments on commit 5901c5a

Please sign in to comment.