Merge pull request #39515 from xilabao/fix-rsync-err

Automatic merge from submit-queue

fix rsync err when make release

fix #39513
This commit is contained in:
Kubernetes Submit Queue 2017-01-24 19:46:29 -08:00 committed by GitHub
commit d5d9a594d8

View File

@ -19,6 +19,9 @@ set -o errexit
set -o nounset
set -o pipefail
USER_ID=$(id -u)
GROUP_ID=$(id -g)
DOCKER_OPTS=${DOCKER_OPTS:-""}
DOCKER=(docker ${DOCKER_OPTS})
DOCKER_HOST=${DOCKER_HOST:-""}
@ -407,6 +410,8 @@ function kube::build::clean() {
# Set up the context directory for the kube-build image and build it.
function kube::build::build_image() {
mkdir -p "${LOCAL_OUTPUT_BUILD_CONTEXT}"
# Make sure the context directory owned by the right user for syncing sources to container.
chown -R ${USER_ID}.${GROUP_ID} "${LOCAL_OUTPUT_BUILD_CONTEXT}"
cp /etc/localtime "${LOCAL_OUTPUT_BUILD_CONTEXT}/"
@ -494,7 +499,7 @@ function kube::build::ensure_data_container() {
--name "${KUBE_DATA_CONTAINER_NAME}"
--hostname "${HOSTNAME}"
"${KUBE_BUILD_IMAGE}"
chown -R $(id -u).$(id -g)
chown -R ${USER_ID}.${GROUP_ID}
"${REMOTE_ROOT}"
/usr/local/go/pkg/
)