fix rsync err when make release

This commit is contained in:
xilabao
2017-01-06 14:44:23 +08:00
parent 4398e1edb0
commit f6ae588207

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/
)