@@ -1089,6 +1089,13 @@ if [ "${OPENSHELL_E2E_KUBE_BUILD_IMAGES}" = "1" ]; then
10891089 reuse_sandbox_image=1
10901090 echo " Reusing existing sandbox image ${sandbox_image} "
10911091 fi
1092+ if [ " ${SANDBOX_RUNTIME_IMAGE} " != " ${sandbox_image} " ]; then
1093+ if e2e_image_reference_has_digest " ${SANDBOX_RUNTIME_IMAGE} " ; then
1094+ echo " ERROR: digest-pinned SANDBOX_IMAGE requires OPENSHELL_E2E_KUBE_BUILD_IMAGES=0" >&2
1095+ exit 2
1096+ fi
1097+ docker tag " ${sandbox_image} " " ${SANDBOX_RUNTIME_IMAGE} "
1098+ fi
10921099 if [ " ${OPENSHELL_E2E_EXTERNAL_COMPUTE_DRIVER:- 0} " != " 1" ] \
10931100 || ! docker image inspect " ${supervisor_image} " > /dev/null 2>&1 ; then
10941101 CONTAINER_ENGINE=docker IMAGE_REGISTRY=" ${REGISTRY_VALUE} " IMAGE_TAG=" ${IMAGE_TAG_VALUE} " \
@@ -1121,17 +1128,17 @@ elif [ "${OPENSHELL_E2E_KUBE_BUILD_IMAGES}" = "1" ] \
11211128 kind_cluster_name=" ${KUBE_CONTEXT# kind-} "
11221129 kind_images=(" ${GATEWAY_IMAGE} " )
11231130 # The CI workflow loads its published sandbox archive before invoking this
1124- # wrapper. Only load a sandbox image here when this script rebuilt it.
1125- if [ " ${reuse_sandbox_image} " != " 1" ]; then
1126- kind_images+=(" ${REGISTRY_VALUE} /sandbox:${IMAGE_TAG_VALUE} " )
1131+ # wrapper. Load a replacement only when this script rebuilt or retagged it.
1132+ if [ " ${reuse_sandbox_image} " != " 1" ] \
1133+ || [ " ${SANDBOX_RUNTIME_IMAGE} " != " ${sandbox_image} " ]; then
1134+ kind_images+=(" ${SANDBOX_RUNTIME_IMAGE} " )
11271135 fi
11281136 # The CI workflow loads its published supervisor archive before invoking this
11291137 # wrapper. Only load a supervisor image here when this script rebuilt it.
11301138 if [ " ${reuse_supervisor_image} " != " 1" ] \
11311139 || [ " ${SUPERVISOR_IMAGE} " != " ${BUILD_SUPERVISOR_IMAGE} " ]; then
11321140 kind_images+=(" ${SUPERVISOR_IMAGE} " )
11331141 fi
1134- if docker image inspect " ${SANDBOX_RUNTIME_IMAGE} " > /dev/null 2>&1 ; then kind_images+=(" ${SANDBOX_RUNTIME_IMAGE} " ); fi
11351142 for image in " ${kind_images[@]} " ; do
11361143 echo " Loading ${image} into kind cluster ${kind_cluster_name} ..."
11371144 kind load docker-image " ${image} " --name " ${kind_cluster_name} "
0 commit comments