Skip to content

Commit

Permalink
Support debug building mode
Browse files Browse the repository at this point in the history
  • Loading branch information
howardjohn committed Aug 4, 2022
1 parent 993bec3 commit 1381ef1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ default: init build test
.PHONY: init
# Downloads envoy, based on the SHA defined in the base pilot Dockerfile
init: $(TARGET_OUT)/istio_is_init
echo ISTIO_ENVOY_LINUX_RELEASE_PATH=$(ISTIO_ENVOY_LINUX_RELEASE_PATH) TARGET_OUT_LINUX=$(TARGET_OUT_LINUX)
@mkdir -p ${TARGET_OUT}/logs
@mkdir -p ${TARGET_OUT}/release

Expand Down
5 changes: 5 additions & 0 deletions tools/docker-builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ func ReadPlan(a Args) (Args, error) {
input := os.Expand(string(by), func(s string) string {
data := archToEnvMap(arch)
data["SIDECAR"] = "envoy"
if _, f := os.LookupEnv("DEBUG_IMAGE"); f {
data["RELEASE_MODE"] = "debug"
} else {
data["RELEASE_MODE"] = "release"
}
if r, f := data[s]; f {
return r
}
Expand Down
3 changes: 2 additions & 1 deletion tools/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ images:
files:
- tools/packaging/common/envoy_bootstrap.json
- tools/packaging/common/gcp_envoy_bootstrap.json
- ${TARGET_OUT_LINUX}/release/${SIDECAR}
- ${TARGET_OUT_LINUX}/${RELEASE_MODE}/${SIDECAR}
# WASM has no debug mode, always use release/
- ${TARGET_OUT_LINUX}/release/stats-filter.wasm
- ${TARGET_OUT_LINUX}/release/stats-filter.compiled.wasm
- ${TARGET_OUT_LINUX}/release/metadata-exchange-filter.wasm
Expand Down

0 comments on commit 1381ef1

Please sign in to comment.