Skip to content

Commit ea6b77f

Browse files
committed
Debian: T7023: download smoketest container images only once
When setting up vyos-1x-smoketest package, the required container images will be fetched from the appropriate registry. During development one will re-install the vyos-1x generated packages periodically. In the past this triggered a re-download of the container images for every set-up of the package. Getting image source signatures Copying blob sha256:d3a4026919f923f4e0bb9a23a1e5c2d3c5593d31cbac8d2d6d032285b4852945 Copying config sha256:c1f39daffdeffeb97987901406e2ecef0fb2c2ca236fdfaf570d088426294d91 Writing manifest to image destination Storing signatures Getting image source signatures Copying blob sha256:a0d0a0d46f8b52473982a3c466318f479767577551a53ffc9074c9fa7035982e Copying blob sha256:064e2154c8ec1ddeb114ebc9db9a3876ee8883e9a14fe8622c31cb6f17b759f6 Copying blob sha256:7e3fbb46165bc5a98b12c136087a13992e30fe00ab4fab2bbe6c7edd657d8c5b Copying blob sha256:80a416511ac029206f3f824a15b1c94845c410242a1e463c466a1b3081f7e20f Copying blob sha256:339be6688c410f9851f6f09cf0c9d63819f8ca5f2bb09d93ce8c42714842f5ed Copying config sha256:6950ba3bd4492642b6c6c0c5f5bb88a5f2a48f700974a2bdba74333a65d9324e Writing manifest to image destination Storing signatures This change will download the container images only if the image is not present on the system.
1 parent 7bf02bf commit ea6b77f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

debian/vyos-1x-smoketest.postinst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
BUSYBOX_TAG="docker.io/library/busybox:stable"
44
BUSYBOX_PATH="/usr/share/vyos/busybox-stable.tar"
5-
if [[ -f $BUSYBOX_PATH ]]; then
6-
rm -f $BUSYBOX_PATH
5+
if [[ ! -f $BUSYBOX_PATH ]]; then
6+
skopeo copy --additional-tag "$BUSYBOX_TAG" "docker://$BUSYBOX_TAG" "docker-archive:/$BUSYBOX_PATH"
77
fi
8-
skopeo copy --additional-tag "$BUSYBOX_TAG" "docker://$BUSYBOX_TAG" "docker-archive:/$BUSYBOX_PATH"
98

109
TACPLUS_TAG="docker.io/lfkeitel/tacacs_plus:alpine"
1110
TACPLUS_PATH="/usr/share/vyos/tacplus-alpine.tar"
12-
if [[ -f $TACPLUS_PATH ]]; then
13-
rm -f $TACPLUS_PATH
11+
if [[ ! -f $TACPLUS_PATH ]]; then
12+
skopeo copy --additional-tag "$TACPLUS_TAG" "docker://$TACPLUS_TAG" "docker-archive:/$TACPLUS_PATH"
1413
fi
15-
skopeo copy --additional-tag "$TACPLUS_TAG" "docker://$TACPLUS_TAG" "docker-archive:/$TACPLUS_PATH"

0 commit comments

Comments
 (0)