From 6ba14f1c2871feb064523d8fb7ef3ac055069a54 Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Wed, 1 Apr 2015 19:20:44 -0700 Subject: [PATCH] Skip cleaning docker cache prior to build This seems to be more trouble than its worth, and much of the remaining build time (except the push itself). We can cache the cross-build/golang images between builds - it's not going to kill us, and it'll save the occasional weird flake of not finding an image when it tries to rm one of these. --- hack/jenkins/build.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hack/jenkins/build.sh b/hack/jenkins/build.sh index 5ea985b68c1..fa4ae642b5f 100755 --- a/hack/jenkins/build.sh +++ b/hack/jenkins/build.sh @@ -34,15 +34,17 @@ export PATH=$PATH:/usr/local/go/bin export KUBE_RELEASE_RUN_TESTS=n export KUBE_SKIP_CONFIRMATIONS=y -# Clean stuff out. Assume the worst - the last build may have left the -# tree in an odd state. There's a Jenkins git clean plugin, but we -# have the docker images to worry about as well, so be really pedantic -# about cleaning. +# Clean stuff out. Assume the last build left the tree in an odd +# state. rm -rf ~/.kube* make clean git clean -fdx -docker ps -aq | xargs -r docker rm -docker images -q | xargs -r docker rmi + +# Uncomment if you want to purge the Docker cache completely each +# build. It costs about 150s each build to pull the golang image and +# rebuild the kube-build:cross image, but these rarely change. +# docker ps -aq | xargs -r docker rm +# docker images -q | xargs -r docker rmi # Build go run ./hack/e2e.go -v --build