Skip to content

Agent Mesh

avoid to rebuild container image

Antonio Ojeaabb99c9cc763
diff --git a/tests/e2e/lib/container_mesh.bash b/tests/e2e/lib/container_mesh.bash
index 7b3e4758..ace38c54 100644
--- a/tests/e2e/lib/container_mesh.bash
+++ b/tests/e2e/lib/container_mesh.bash
@@ -27,10 +27,12 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
}
mesh_build_runtime_image() {
- docker build \
- -f tests/e2e/docker/Dockerfile.sam-runtime \
- -t "${MESH_RUNTIME_IMAGE}" \
- . >/dev/null
+ if ! docker image inspect "${MESH_RUNTIME_IMAGE}" >/dev/null 2>&1; then
+ docker build \
+ -f tests/e2e/docker/Dockerfile.sam-runtime \
+ -t "${MESH_RUNTIME_IMAGE}" \
+ . >/dev/null
+ fi
}
mesh_setup_env() {