Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean out dead docker containers and docker images every Jenkins build #3991

Merged
merged 1 commit into from
Feb 3, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 7 additions & 8 deletions hack/jenkins/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,15 @@ export PATH=$PATH:/usr/local/go/bin
export KUBE_RELEASE_RUN_TESTS=n
export KUBE_SKIP_CONFIRMATIONS=y

# Clean stuff out.
#
# TODO: Look at git clean plugin again for hermeticism, but may not
# play nicely with dockerized stuff and permissions. (We may just need
# to force the build/make-clean.sh at the end of the build regardless
# of status and be delicate with the exit status.) (Low priority
# unless there's a hermetic issue.)
# 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.
rm -rf ~/.kube*
./build/make-clean.sh
make clean
git clean -fdx
docker ps -aq | xargs -r docker rm
docker images -q | xargs -r docker rmi

# Build
go run ./hack/e2e.go -v --build
Expand Down