fix(test): hold the integration image with its container from the build on
Test / test (push) Successful in 23m10s
Build and publish image / image (push) Successful in 54s

This commit is contained in:
bryanpedini committed 2026-11-20 20:42:37 +01:00
1 parent 194dfc9644
commit a2f8e59d9b
1 file changed
+3 -3
+3 -3
View File
@@ -65,6 +65,9 @@ fi
network_id=$(docker network create --internal "$network")
require_free_docker_name image "$image"
docker build --target integration --file dockerfile --tag "$image" --iidfile "$tmp/image-id" .
tests_id=$(docker create --name "$tests" --network "$network_id" \
--env IT_GALERA="$IT_GALERA" --env IT_MYSQL_HOST=mysql --env IT_MYSQL_PORT=3306 --env IT_MYSQL_ROOT_PASSWORD="$root_password" \
"$(cat "$tmp/image-id")")
set --
if [ "$IT_GALERA" = 1 ]; then
set -- --wsrep-on=ON --wsrep-provider=/usr/lib/galera/libgalera_smm.so \
@@ -86,7 +89,4 @@ until docker exec --env MYSQL_PWD="$root_password" "$mysql_id" sh -c '
fi
sleep 1
done
tests_id=$(docker create --name "$tests" --network "$network_id" \
--env IT_GALERA="$IT_GALERA" --env IT_MYSQL_HOST=mysql --env IT_MYSQL_PORT=3306 --env IT_MYSQL_ROOT_PASSWORD="$root_password" \
"$(cat "$tmp/image-id")")
docker start --attach "$tests_id"