X Tutup
Skip to content

Commit 23cf26f

Browse files
test: Delete docker buildx node unconditionally (letsencrypt#5847)
Currently, if `docker buildx` fails the cross-compilation node, created before the build starts, will never be deleted. This ensures that the cross-compilation node is always deleted before `tag_and_upload.sh` exits.
1 parent 5c02dea commit 23cf26f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/boulder-tools/tag_and_upload.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ do
1818

1919
# create a docker buildx node for cross-compilation.
2020
docker buildx create --use --name=cross
21+
22+
# on EXIT, delete the docker buildx node.
23+
trap "docker buildx rm cross" EXIT
2124

2225
# build, tag, and push the image.
2326
docker buildx build --build-arg "GO_VERSION=${GO_VERSION}" \
2427
--push --tag "${TAG_NAME}" \
2528
--platform=linux/amd64,linux/arm64 .
26-
27-
# delete the docker buildx node.
28-
docker buildx rm cross
2929
done
3030

3131
# TODO(@cpu): Figure out a `sed` for updating the date in `docker-compose.yml`'s

0 commit comments

Comments
 (0)
X Tutup