From 3930f277fca0c3ef67c3689374ffc4becd2abd2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Wed, 29 Jun 2022 15:30:16 +0200 Subject: [PATCH] test: make run-builder.sh work with podman 4 RHEL is now shipping podman 4 that encodes the networks differently, let's implement a small dirty hack to fix it on RHEL before https://github.com/osbuild/koji-osbuild/pull/100 can land and fix it properly. --- test/run-builder.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/run-builder.sh b/test/run-builder.sh index 86d47a8..e8c35bd 100755 --- a/test/run-builder.sh +++ b/test/run-builder.sh @@ -22,7 +22,12 @@ else fi builder_start() { - GATEWAY_IP=$(${CONTAINER_RUNTIME} network inspect org.osbuild.koji | jq -r ".[0].plugins[0].ipam.ranges[0][0].gateway") + source /etc/os-release + if [[ $ID == rhel ]]; then + GATEWAY_IP=$(${CONTAINER_RUNTIME} network inspect org.osbuild.koji | jq -r ".[0].subnets[0].gateway") + else + GATEWAY_IP=$(${CONTAINER_RUNTIME} network inspect org.osbuild.koji | jq -r ".[0].plugins[0].ipam.ranges[0][0].gateway") + fi echo "Gateway IP is $GATEWAY_IP" # maybe copy the 'builder' plugin to the share dir