Commit ef9e3ecb authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #50417 from dims/avoid-rsync-dot-git-directory

Automatic merge from submit-queue (batch tested with PRs 49129, 50436, 50417, 50553, 47587) Avoid rsync of .git directory **What this PR does / why we need it**: We don't really need the .git directory to be transferred. This problem was introduced in the PR #46193: "Run the update-staging-godeps script inside a docker container" **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: Fixes #50272 **Release note**: ```release-note NONE ```
parents 9ac6e4ae 827af63e
...@@ -682,10 +682,13 @@ function kube::build::sync_to_container() { ...@@ -682,10 +682,13 @@ function kube::build::sync_to_container() {
# they will not be re-generated by 'make'. # they will not be re-generated by 'make'.
kube::build::rsync \ kube::build::rsync \
--delete \ --delete \
--filter='- /.git/' \
--filter='- /.make/' \ --filter='- /.make/' \
--filter='- /_tmp/' \ --filter='- /_tmp/' \
--filter='- /_output/' \ --filter='- /_output/' \
--filter='- /' \ --filter='- /' \
--filter='- zz_generated.*' \
--filter='- generated.proto' \
"${KUBE_ROOT}/" "rsync://k8s@${KUBE_RSYNC_ADDR}/k8s/" "${KUBE_ROOT}/" "rsync://k8s@${KUBE_RSYNC_ADDR}/k8s/"
kube::build::stop_rsyncd_container kube::build::stop_rsyncd_container
......
...@@ -87,6 +87,15 @@ function diffGodepManifest() { ...@@ -87,6 +87,15 @@ function diffGodepManifest() {
fi 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 # move into staging and save the dependencies for everything in order
mkdir -p "${TMP_GOPATH}/src/k8s.io" mkdir -p "${TMP_GOPATH}/src/k8s.io"
for repo in $(ls ${KUBE_ROOT}/staging/src/k8s.io); do for repo in $(ls ${KUBE_ROOT}/staging/src/k8s.io); do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment