Skip to content

Commit

Permalink
Stop publishing release binaries as debug binaries. (envoyproxy#2344)
Browse files Browse the repository at this point in the history
* Stop publishing release binaries as debug binaries.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

* review: use $(bazel info output_path).

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
  • Loading branch information
PiotrSikora authored and istio-testing committed Aug 7, 2019
1 parent 9e5640a commit 6f000a8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scripts/release-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ echo "Destination bucket: $DST"
UBUNTU_RELEASE=${UBUNTU_RELEASE:-$(lsb_release -c -s)}
[[ "${UBUNTU_RELEASE}" == 'xenial' ]] || { echo 'must run on Ubuntu Xenial'; exit 1; }

# Symlinks don't work, use full path as a temporary workaround.
# See: https://github.com/istio/istio/issues/15714 for details.
# k8-opt is the output directory for x86_64 optimized builds (-c opt, so --config=release-symbol and --config=release).
BAZEL_OUT="$(bazel info output_path)/k8-opt/bin"

# The proxy binary name.
SHA="$(git rev-parse --verify HEAD)"

Expand All @@ -57,8 +62,7 @@ SHA256_NAME="${HOME}/envoy-symbol-${SHA}.sha256"
gsutil stat "${DST}/${BINARY_NAME}" \
&& { echo 'Binary already exists'; exit 0; } \
|| echo 'Building a new binary.'
# 45ae47b4a0e12d1e81c831ece04d820d is md5 hash of /home/prow/go/src/istio.io/proxy
BAZEL_OUT='/home/bootstrap/.cache/bazel/_bazel_bootstrap/45ae47b4a0e12d1e81c831ece04d820d/execroot/__main__/bazel-out/k8-opt/bin'

# Build the release binary with symbol
CC=${CC} CXX=${CXX} bazel build ${BAZEL_BUILD_ARGS} --config=release-symbol //src/envoy:envoy_tar
BAZEL_TARGET="${BAZEL_OUT}/src/envoy/envoy_tar.tar.gz"
Expand Down Expand Up @@ -93,6 +97,10 @@ sha256sum "${BINARY_NAME}" > "${SHA256_NAME}"
echo "Copying ${BINARY_NAME} ${SHA256_NAME} to ${DST}/"
gsutil cp "${BINARY_NAME}" "${SHA256_NAME}" "${DST}/"

# Symlinks don't work, use full path as a temporary workaround.
# See: https://github.com/istio/istio/issues/15714 for details.
# k8-dbg is the output directory for x86_64 debug builds (-c dbg).
BAZEL_OUT="$(bazel info output_path)/k8-dbg/bin"

# Build the debug binary
BINARY_NAME="${HOME}/envoy-debug-${SHA}.tar.gz"
Expand Down

0 comments on commit 6f000a8

Please sign in to comment.