From 914dedc45397e25ccd3943c0068c8df976529b3a Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Thu, 27 Oct 2016 14:30:10 +0000 Subject: [PATCH] Clean up after build to avoid polluting the Jenkins server --- automation/jenkins_build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/automation/jenkins_build.sh b/automation/jenkins_build.sh index 538223dc..4a7eb678 100755 --- a/automation/jenkins_build.sh +++ b/automation/jenkins_build.sh @@ -33,3 +33,8 @@ make ${MAKE_ARGS} \ DEPLOY_REGISTRY=registry.resinstaging.io/ \ deploy +# Cleanup removing by Id to actually remove the images rather than untagging them +docker rmi -f $(docker inspect -f "{{.Id}}" registry.resinstaging.io/resin/${ARCH}-supervisor:${ESCAPED_BRANCH_NAME}) || true +docker rmi -f $(docker inspect -f "{{.Id}}" resin/${ARCH}-supervisor:${ESCAPED_BRANCH_NAME}) || true +docker rmi -f $(docker inspect -f "{{.Id}}" registry.resinstaging.io/resin/node-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME}) || true +docker rmi -f $(docker inspect -f "{{.Id}}" registry.resinstaging.io/resin/go-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME}) || true