Skip to content

Commit

Permalink
Use HOSTNAME in Docker build image tag hash
Browse files Browse the repository at this point in the history
Additionally, use REPO_DIR in update-generated-protobuf, since this
should be more unique (when set).
  • Loading branch information
ixdy committed May 2, 2016
1 parent 879c180 commit 0f04138
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function kube::build::verify_prereqs() {
fi
kube::build::ensure_docker_daemon_connectivity || return 1

KUBE_ROOT_HASH=$(kube::build::short_hash "$KUBE_ROOT")
KUBE_ROOT_HASH=$(kube::build::short_hash "${HOSTNAME:-}:${KUBE_ROOT}")
KUBE_BUILD_IMAGE_TAG="build-${KUBE_ROOT_HASH}"
KUBE_BUILD_IMAGE="${KUBE_BUILD_IMAGE_REPO}:${KUBE_BUILD_IMAGE_TAG}"
KUBE_BUILD_CONTAINER_NAME="kube-build-${KUBE_ROOT_HASH}"
Expand Down
2 changes: 1 addition & 1 deletion hack/update-generated-protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function prereqs() {
fi
kube::build::ensure_docker_daemon_connectivity || return 1

KUBE_ROOT_HASH=$(kube::build::short_hash "$KUBE_ROOT/go-to-protobuf")
KUBE_ROOT_HASH=$(kube::build::short_hash "${HOSTNAME:-}:${REPO_DIR:-${KUBE_ROOT}}/go-to-protobuf")
KUBE_BUILD_IMAGE_TAG="build-${KUBE_ROOT_HASH}"
KUBE_BUILD_IMAGE="${KUBE_BUILD_IMAGE_REPO}:${KUBE_BUILD_IMAGE_TAG}"
KUBE_BUILD_CONTAINER_NAME="kube-build-${KUBE_ROOT_HASH}"
Expand Down

0 comments on commit 0f04138

Please sign in to comment.