rsync git directories into kube-build

pull/6/head
Christoph Blecker 2017-05-23 22:39:03 -07:00
parent e89ab20ceb
commit d3b838b608
No known key found for this signature in database
GPG Key ID: B34A59A9D39F838B
3 changed files with 10 additions and 6 deletions

View File

@ -36,6 +36,13 @@ ENV KUBE_OUTPUT_SUBPATH _output/dockerized
# Pick up version stuff here as we don't copy our .git over.
ENV KUBE_GIT_VERSION_FILE ${HOME}/.dockerized-kube-version-defs
# Add system-wide git user information
RUN git config --system user.email "nobody@k8s.io" \
&& git config --system user.name "kube-build-image"
# Fix permissions on gopath
RUN chmod -R a+rwx $GOPATH
# Make log messages use the right timezone
ADD localtime /etc/localtime
RUN chmod a+r /etc/localtime

View File

@ -77,7 +77,7 @@ port = 8730
secrets file = ${SECRETS}
read only = false
path = ${VOLUME}
filter = - /.make/ - /.git/ - /_tmp/
filter = - /.make/ - /_tmp/
EOF
exec /usr/bin/rsync --no-detach --daemon --config="${CONFFILE}" "$@"

View File

@ -682,14 +682,10 @@ function kube::build::sync_to_container() {
# they will not be re-generated by 'make'.
kube::build::rsync \
--delete \
--filter='+ /staging/**' \
--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
@ -715,8 +711,9 @@ function kube::build::copy_output() {
# We are looking to copy out all of the built binaries along with various
# generated files.
kube::build::rsync \
--filter='- /vendor/' \
--filter='- /_temp/' \
--filter='+ /vendor/' \
--filter='+ /Godeps/' \
--filter='+ /_output/dockerized/bin/**' \
--filter='+ zz_generated.*' \
--filter='+ generated.proto' \