diff --git a/.github/workflows/_verify_examples.yml b/.github/workflows/_verify_examples.yml index 65965333..4f17034b 100644 --- a/.github/workflows/_verify_examples.yml +++ b/.github/workflows/_verify_examples.yml @@ -60,6 +60,22 @@ jobs: with: path: /home/runner/.cache key: ${{ runner.os }}-bazel-${{ hashFiles('examples/**/BUILD', 'examples/**/*bzl', 'examples/WORKSPACE') }} + - name: Inject bzlmod sibling overrides into MODULE.bazel + run: | + # The sibling example modules are checked out alongside this module in + # CI, so resolve them from the local tree rather than the registry. + cat >> MODULE.bazel <<'EOF' + + local_path_override( + module_name = "envoy-example-filter-cc", + path = "filter-cc", + ) + local_path_override( + module_name = "envoy-example-wasm-cc", + path = "wasm-cc", + ) + EOF + working-directory: examples - name: RBE auth check id: rbe diff --git a/MODULE.bazel b/MODULE.bazel index 3c878047..cf71d165 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -15,23 +15,3 @@ bazel_dep(name = "toolchains_llvm", version = "1.9.0.envoy", dev_dependency = Tr envoy_toolchains_ext = use_extension("@envoy//bazel:extensions.bzl", "envoy_toolchains_extension") use_repo(envoy_toolchains_ext, "clang_platform") - -# local_path_override( -# module_name = "envoy", -# path = "../envoy", -# ) -# -# local_path_override( -# module_name = "envoy_api", -# path = "../envoy/api", -# ) - -local_path_override( - module_name = "envoy-example-filter-cc", - path = "filter-cc", -) - -local_path_override( - module_name = "envoy-example-wasm-cc", - path = "wasm-cc", -) diff --git a/docker-compose.yml b/docker-compose.yml index d67f895c..64a74683 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -61,7 +61,10 @@ services: - "${DOCKER_EXAMPLES_LOG:-/var/log/docker-examples}:/var/log/docker" working_dir: /workspace/examples environment: - BAZEL_BUILD_EXTRA_OPTIONS: "${BAZEL_BUILD_EXTRA_OPTIONS:-}" + BAZEL_BUILD_EXTRA_OPTIONS: >- + ${BAZEL_BUILD_EXTRA_OPTIONS:- + --override_module=envoy-example-filter-cc=filter-cc + --override_module=envoy-example-wasm-cc=wasm-cc} BUILD_UID: "${UID:-1000}" USER_UID: "${UID:-1000}" GROUP_UID: "${UID:-1000}"