Excluding the whole cluster directoyr is wrong
We still need to perform code formating and code-generate steps, so make
sure we only exclude binaries.
@@ -44,14 +44,14 @@ _rsync() {
rm ${KUBEVIRT_DIR}/.glide*.hash -f
# Copy kubevirt into the persistent docker volume
-_rsync --delete --exclude 'cluster/vagrant*' --exclude "_out" --exclude ".vagrant" ${KUBEVIRT_DIR}/ "rsync://root@127.0.0.1:${RSYNCD_PORT}/build"
+_rsync --delete --exclude 'cluster/**/.kubectl' --exclude 'cluster/**/.oc' --exclude 'cluster/**/.kubeconfig' --exclude "_out" --exclude ".vagrant" ${KUBEVIRT_DIR}/ "rsync://root@127.0.0.1:${RSYNCD_PORT}/build"
# Run the command
test -t 1 && USE_TTY="-it"
docker run --rm -v "${BUILDER}:/root:rw,z" ${USE_TTY} -w "/root/go/src/kubevirt.io/kubevirt" ${BUILDER} "$@"
# Copy the whole kubevirt data out to get generated sources and formatting changes
-_rsync --exclude '.glide*' --exclude "_out" --exclude "vendor" --exclude ".vagrant" --exclude ".git" "rsync://root@127.0.0.1:${RSYNCD_PORT}/build" ${KUBEVIRT_DIR}/
+_rsync --exclude '.glide*' --exclude 'cluster/**/.kubectl' --exclude 'cluster/**/.oc' --exclude 'cluster/**/.kubeconfig' --exclude "_out" --exclude "vendor" --exclude ".vagrant" --exclude ".git" "rsync://root@127.0.0.1:${RSYNCD_PORT}/build" ${KUBEVIRT_DIR}/
if [ "$SYNC_VENDOR" = "true" ]; then
_rsync --delete "rsync://root@127.0.0.1:${RSYNCD_PORT}/vendor" ${VENDOR_DIR}
fi
