mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-20 17:52:51 +00:00
Make cleanup in jenkins build less aggressive, but remove all created tags
We've been deleting images by id and forcing removal, which might not play nicely with other processes using images with shared parents. Now we don't force removal and remove by tag and not by id, which should play more nicely with others. We also ensure all the tags we use/create are removed so that images are actually deleted if not used. Change-Type: patch Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
parent
f16c5d5e92
commit
829284e83a
@ -49,9 +49,14 @@ 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}}" ${NODE_SUPERVISOR_REPO}:${ESCAPED_BRANCH_NAME}) || true
|
||||
docker rmi -f $(docker inspect -f "{{.Id}}" ${GO_SUPERVISOR_REPO}:${ESCAPED_BRANCH_NAME}) || true
|
||||
docker rmi -f $(docker inspect -f "{{.Id}}" ${BASE_IMAGE_TAG}) || true
|
||||
docker rmi registry.resinstaging.io/resin/${ARCH}-supervisor:${ESCAPED_BRANCH_NAME} || true
|
||||
docker rmi resin/${ARCH}-supervisor:${ESCAPED_BRANCH_NAME} || true
|
||||
docker rmi resin/${ARCH}-supervisor:master || true
|
||||
docker rmi ${NODE_SUPERVISOR_REPO}:${ESCAPED_BRANCH_NAME} || true
|
||||
docker rmi ${NODE_SUPERVISOR_REPO}:master || true
|
||||
docker rmi resin/node-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME} || true
|
||||
docker rmi ${GO_SUPERVISOR_REPO}:${ESCAPED_BRANCH_NAME} || true
|
||||
docker rmi ${GO_SUPERVISOR_REPO}:master || true
|
||||
docker rmi resin/go-supervisor-${ARCH}:${ESCAPED_BRANCH_NAME} || true
|
||||
docker rmi ${BASE_IMAGE_TAG} || true
|
||||
docker rmi ${BASE_IMAGE_REPO}:${ESCAPED_BRANCH_NAME} || true
|
||||
|
@ -48,7 +48,8 @@ docker run --rm \
|
||||
-v $SSTATE_DIR:/yocto/shared-sstate \
|
||||
-v `pwd`/dest:/dest \
|
||||
${BUILDER_IMAGE}
|
||||
docker rmi -f $(docker inspect -f "{{.Id}}" ${BUILDER_IMAGE}) || true
|
||||
docker rmi ${BUILDER_IMAGE} || true
|
||||
docker rmi ${BUILDER_REPO}:master || true
|
||||
if [ -f dest/rootfs.tar.gz ]; then
|
||||
docker import dest/rootfs.tar.gz ${BASE_IMAGE_TAG}
|
||||
docker tag ${BASE_IMAGE_TAG} ${BASE_IMAGE_REPO}:${ESCAPED_BRANCH_NAME} || docker tag -f ${BASE_IMAGE_TAG} ${BASE_IMAGE_REPO}:${ESCAPED_BRANCH_NAME}
|
||||
|
Loading…
x
Reference in New Issue
Block a user