diff --git a/script/release-binary b/script/release-binary index 9bd7b51bf36..af90b1aa0da 100755 --- a/script/release-binary +++ b/script/release-binary @@ -16,18 +16,20 @@ # ################################################################################ # +set -ex + +# Make sure to this script on x86_64 Ubuntu Xenial # The bucket name to store proxy binary BUCKET_NAME="istio-build/proxy" # The proxy binary name. -BINARY_FORMAT='proxy-alpha-%H' +BINARY_FORMAT='envoy-alpha-%H.tar.gz' BINARY_NAME="$(git show -q HEAD --pretty=format:"${BINARY_FORMAT}")" # Build the binary -bazel build --config=release //src/envoy/mixer:envoy_esp - -SRC="bazel-bin/src/envoy/mixer/envoy_esp" +bazel build --config=release //src/envoy/mixer:envoy_tar +SRC="bazel-bin/src/envoy/mixer/envoy_tar.tar.gz" DST="gs://${BUCKET_NAME}/${BINARY_NAME}" # Copy it to the bucket. diff --git a/src/envoy/mixer/BUILD b/src/envoy/mixer/BUILD index 428c87101b9..45c96e25f96 100644 --- a/src/envoy/mixer/BUILD +++ b/src/envoy/mixer/BUILD @@ -15,7 +15,7 @@ ################################################################################ # -package(default_visibility = ["//visibility:public"]) +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") cc_library( name = "filter_lib", @@ -32,10 +32,18 @@ cc_library( ) cc_binary( - name = "envoy_esp", + name = "envoy", linkstatic = 1, deps = [ ":filter_lib", "@envoy_git//:envoy-main", ], ) + +pkg_tar( + name = "envoy_tar", + extension = "tar.gz", + files = [":envoy"], + mode = "0755", + package_dir = "/usr/local/bin/", +) diff --git a/src/envoy/mixer/README.md b/src/envoy/mixer/README.md index 94276e37826..9094d748442 100644 --- a/src/envoy/mixer/README.md +++ b/src/envoy/mixer/README.md @@ -12,10 +12,10 @@ This Proxy will use Envoy and talk to Mixer server. ## Build Envoy proxy -* Build target envoy_esp: +* Build target envoy: ``` - bazel build //src/envoy/mixer:envoy_esp + bazel build //src/envoy/mixer:envoy ``` ## How to run it @@ -38,7 +38,7 @@ This Proxy will use Envoy and talk to Mixer server. * Start Envoy proxy, run ``` - bazel-bin/src/envoy/mixer/envoy_esp -c src/envoy/prototype/envoy-mixer.conf + bazel-bin/src/envoy/mixer/envoy -c src/envoy/prototype/envoy-mixer.conf ``` * Then issue HTTP request to proxy.