#!/usr/bin/env bash # The AOT cache trained in image aot-cache, run by its own JVM and by a different JVM build. # -> docs/output/aot-cache-mismatch.txt set -uo pipefail source "$(dirname "$0")/env.sh" cd "$MODULE_DIR" docker build -q -f docker/Dockerfile.aot-cache-mismatch -t sbd/docker-images:aot-cache-mismatch . > /dev/null { for t in aot-cache aot-cache-mismatch; do name="aot-$$"; docker rm -f "$name" > /dev/null 2>&1 docker run -d --name "$name" "sbd/docker-images:$t" > /dev/null for _ in $(seq 1 200); do docker logs "$name" 2>&1 | grep -q 'Started ImagesApplication' && break; sleep 0.1; done echo "## sbd/docker-images:$t" docker logs "$name" 2>&1 | grep -E '\[aot\]|Starting ImagesApplication|Started ImagesApplication' \ | sed -E 's/^[0-9T:.-]+Z +INFO 1 --- \[docker-images\] \[ +main\] com.ankurm.images.ImagesApplication +: //' | cut -c1-120 echo "exit status while running: $(docker inspect -f '{{.State.Status}}' "$name")" docker rm -f "$name" > /dev/null echo done } | tee "$OUT/aot-cache-mismatch.txt"