Skip to content

Commit

Permalink
Creates a KEY for mixer client dep. Updates release-binary (envoyprox…
Browse files Browse the repository at this point in the history
…y#79)

* Updated mixer repo to use a key for commit

* release-binary skip build if file exists.
  • Loading branch information
sebastienvas authored Feb 10, 2017
1 parent 673b902 commit 366f5ae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 10 additions & 5 deletions script/release-binary
Original file line number Diff line number Diff line change
Expand Up @@ -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}/"

4 changes: 3 additions & 1 deletion src/envoy/mixer/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)

Expand Down

0 comments on commit 366f5ae

Please sign in to comment.