From 366f5ae62eaf24888240c8b998cc43f3a0c975ca Mon Sep 17 00:00:00 2001 From: Sebastien Vas Date: Fri, 10 Feb 2017 11:53:45 -0800 Subject: [PATCH] Creates a KEY for mixer client dep. Updates release-binary (#79) * Updated mixer repo to use a key for commit * release-binary skip build if file exists. --- script/release-binary | 15 ++++++++++----- src/envoy/mixer/repositories.bzl | 4 +++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/script/release-binary b/script/release-binary index bf83a7d3115a..61d446533b8a 100755 --- a/script/release-binary +++ b/script/release-binary @@ -19,24 +19,29 @@ set -ex # Make sure to this script on x86_64 Ubuntu Xenial +UBUNTU_RELEASE="$(lsb_release -c -s)" +[[ "${UBUNTU_RELEASE}" == 'xenial' ]] || { echo 'must run on Ubuntu Xenial'; exit 1; } # The bucket name to store proxy binary -BUCKET_NAME="istio-build/proxy" +DST="gs://istio-build/proxy" # The proxy binary name. SHA="$(git rev-parse --verify HEAD)" BINARY_NAME="envoy-alpha-${SHA}.tar.gz" SHA256_NAME="envoy-alpha-${SHA}.sha256" +# If binary already exists skip. +gsutil stat "${DST}/${BINARY_NAME}" \ + && { echo 'Binary already exists'; exit 0; } \ + || echo 'Building a new binary.' + # Build the binary bazel build --config=release //src/envoy/mixer:envoy_tar BAZEL_TARGET="bazel-bin/src/envoy/mixer/envoy_tar.tar.gz" ln "${BAZEL_TARGET}" "${BINARY_NAME}" sha256sum "${BINARY_NAME}" > "${SHA256_NAME}" -DST="gs://${BUCKET_NAME}/" # Copy it to the bucket. -echo "Copying ${BINARY_NAME} ${SHA256_NAME} to ${DST}" -gsutil cp "${BINARY_NAME}" "${SHA256_NAME}" "${DST}" - +echo "Copying ${BINARY_NAME} ${SHA256_NAME} to ${DST}/" +gsutil cp "${BINARY_NAME}" "${SHA256_NAME}" "${DST}/" diff --git a/src/envoy/mixer/repositories.bzl b/src/envoy/mixer/repositories.bzl index d5dfe4ac19cd..1ec26f2a47cc 100644 --- a/src/envoy/mixer/repositories.bzl +++ b/src/envoy/mixer/repositories.bzl @@ -15,10 +15,12 @@ ################################################################################ # +MIXER_CLIENT = "7b8544d765f9d7d86d28770c8d27d69cbf9509ac" + def mixer_client_repositories(bind=True): native.git_repository( name = "mixerclient_git", - commit = "7b8544d765f9d7d86d28770c8d27d69cbf9509ac", + commit = MIXER_CLIENT, remote = "https://github.com/istio/mixerclient.git", )