Skip to content

Commit

Permalink
build: add config_load_check_tool to tools-* image (#37988)
Browse files Browse the repository at this point in the history
This change adds `config_load_check_tool` binary to `tools-*` image

Fixes #37987

Signed-off-by: SK <[email protected]>
Co-authored-by: SK <[email protected]>
  • Loading branch information
gray-oni and SK authored Jan 13, 2025
1 parent e2084ce commit 47f99c5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
!/linux/amd64/release.tar.zst
!/linux/amd64/schema_validator_tool
!/linux/amd64/router_check_tool
!/linux/amd64/config_load_check_tool
!/linux/arm64/release.tar.zst
!/linux/arm64/schema_validator_tool
!/linux/arm64/router_check_tool
!/linux/arm64/config_load_check_tool
!/local
!/test/config/integration/certs
!/windows
2 changes: 1 addition & 1 deletion ci/Dockerfile-envoy
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ FROM envoy AS envoy-tools
ARG TARGETPLATFORM
ENV TARGETPLATFORM="${TARGETPLATFORM:-linux/amd64}"
COPY --chown=0:0 --chmod=755 \
"${TARGETPLATFORM}/schema_validator_tool" "${TARGETPLATFORM}/router_check_tool" /usr/local/bin/
"${TARGETPLATFORM}/schema_validator_tool" "${TARGETPLATFORM}/router_check_tool" "${TARGETPLATFORM}/config_load_check_tool" /usr/local/bin/


# STAGE: envoy-distroless
Expand Down
10 changes: 10 additions & 0 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ function cp_binary_for_image_build() {
-o "${BASE_TARGET_DIR}"/"${TARGET_DIR}"/schema_validator_tool
strip bazel-bin/test/tools/router_check/router_check_tool \
-o "${BASE_TARGET_DIR}"/"${TARGET_DIR}"/router_check_tool
strip bazel-bin/test/tools/config_load_check/config_load_check_tool \
-o "${BASE_TARGET_DIR}"/"${TARGET_DIR}"/config_load_check_tool

# Copy the su-exec utility binary into the image
cp -f bazel-bin/external/com_github_ncopa_suexec/su-exec "${BASE_TARGET_DIR}"/"${TARGET_DIR}"
Expand Down Expand Up @@ -163,6 +165,8 @@ function bazel_binary_build() {
//test/tools/schema_validator:schema_validator_tool "${CONFIG_ARGS[@]}"
bazel build "${BAZEL_BUILD_OPTIONS[@]}" --remote_download_toplevel -c "${COMPILE_TYPE}" \
//test/tools/router_check:router_check_tool "${CONFIG_ARGS[@]}"
bazel build "${BAZEL_BUILD_OPTIONS[@]}" --remote_download_toplevel -c "${COMPILE_TYPE}" \
//test/tools/config_load_check:config_load_check_tool "${CONFIG_ARGS[@]}"

# Build su-exec utility
bazel build "${BAZEL_BUILD_OPTIONS[@]}" --remote_download_toplevel -c "${COMPILE_TYPE}" @com_github_ncopa_suexec//:su-exec
Expand Down Expand Up @@ -779,6 +783,12 @@ case $CI_TARGET in
cp -a \
bazel-bin/test/tools/router_check/router_check_tool.stripped \
"${ENVOY_BINARY_DIR}/router_check_tool"
bazel build "${BAZEL_BUILD_OPTIONS[@]}" "${BAZEL_RELEASE_OPTIONS[@]}" \
--remote_download_toplevel \
//test/tools/config_load_check:config_load_check_tool.stripped
cp -a \
bazel-bin/test/tools/config_load_check/config_load_check_tool.stripped \
"${ENVOY_BINARY_DIR}/config_load_check_tool"
echo "Release files created in ${ENVOY_BINARY_DIR}"
;;

Expand Down
2 changes: 2 additions & 0 deletions docs/root/operations/tools/config_load_check_tool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Output
exit with status EXIT_SUCCESS.

Building
The tool is included in the :ref:`tools image <install_tools>`.

The tool can be built locally using Bazel. ::

bazel build //test/tools/config_load_check:config_load_check_tool
Expand Down

0 comments on commit 47f99c5

Please sign in to comment.