Modify rsync filter to retain output across runs

This commit is contained in:
Christoph Blecker 2017-08-25 16:58:59 -07:00
parent 4d63e13c9f
commit 4f1106c8a5
No known key found for this signature in database
GPG Key ID: B34A59A9D39F838B

View File

@ -654,7 +654,6 @@ function kube::build::stop_rsyncd_container() {
function kube::build::rsync {
local -a rsync_opts=(
--archive
--prune-empty-dirs
--password-file="${LOCAL_OUTPUT_BUILD_CONTEXT}/rsyncd.password"
)
if (( ${KUBE_VERBOSE} >= 6 )); then
@ -679,16 +678,19 @@ function kube::build::sync_to_container() {
# directory and generated files. The '- /' filter prevents rsync
# from trying to set the uid/gid/perms on the root of the sync tree.
# As an exception, we need to sync generated files in staging/, because
# they will not be re-generated by 'make'.
# they will not be re-generated by 'make'. Note that the 'H' filtered files
# are hidden from rsync so they will be deleted in the target container if
# they exist. This will allow them to be re-created in the container if
# necessary.
kube::build::rsync \
--delete \
--filter='- /.git/' \
--filter='H /.git/' \
--filter='- /.make/' \
--filter='- /_tmp/' \
--filter='- /_output/' \
--filter='- /' \
--filter='- zz_generated.*' \
--filter='- generated.proto' \
--filter='H zz_generated.*' \
--filter='H generated.proto' \
"${KUBE_ROOT}/" "rsync://k8s@${KUBE_RSYNC_ADDR}/k8s/"
kube::build::stop_rsyncd_container
@ -714,6 +716,7 @@ function kube::build::copy_output() {
# We are looking to copy out all of the built binaries along with various
# generated files.
kube::build::rsync \
--prune-empty-dirs \
--filter='- /_temp/' \
--filter='+ /vendor/' \
--filter='+ /Godeps/' \