From 827af63e72304a73f0c8624d570b6c1120ed4923 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Wed, 9 Aug 2017 22:29:27 -0400 Subject: [PATCH] Avoid rsync of .git directory We don't really need the .git directory to be transferred. This problem was introduced in the PR: "Run the update-staging-godeps script inside a docker container" Fixes #50272 --- build/common.sh | 3 +++ hack/update-staging-godeps-dockerized.sh | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/build/common.sh b/build/common.sh index a2b5d21659a..80c6fc7d8a3 100755 --- a/build/common.sh +++ b/build/common.sh @@ -682,10 +682,13 @@ function kube::build::sync_to_container() { # they will not be re-generated by 'make'. kube::build::rsync \ --delete \ + --filter='- /.git/' \ --filter='- /.make/' \ --filter='- /_tmp/' \ --filter='- /_output/' \ --filter='- /' \ + --filter='- zz_generated.*' \ + --filter='- generated.proto' \ "${KUBE_ROOT}/" "rsync://k8s@${KUBE_RSYNC_ADDR}/k8s/" kube::build::stop_rsyncd_container diff --git a/hack/update-staging-godeps-dockerized.sh b/hack/update-staging-godeps-dockerized.sh index f1b48e5f611..458cbb211f2 100755 --- a/hack/update-staging-godeps-dockerized.sh +++ b/hack/update-staging-godeps-dockerized.sh @@ -87,6 +87,15 @@ function diffGodepManifest() { fi } +# Create a fake git repo for staging to prevent godeps from complaining +pushd "${KUBE_ROOT}" >/dev/null + git init >/dev/null + git config --local user.email "nobody@k8s.io" + git config --local user.name "$0" + git add . >/dev/null + git commit -q -m "Snapshot" >/dev/null +popd >/dev/null + # move into staging and save the dependencies for everything in order mkdir -p "${TMP_GOPATH}/src/k8s.io" for repo in $(ls ${KUBE_ROOT}/staging/src/k8s.io); do