Skip to content

Commit 3930f27

Browse files
ondrejbudaigicmo
authored andcommitted
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 #100 can land and fix it properly.
1 parent 12773db commit 3930f27

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/run-builder.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ else
2222
fi
2323

2424
builder_start() {
25-
GATEWAY_IP=$(${CONTAINER_RUNTIME} network inspect org.osbuild.koji | jq -r ".[0].plugins[0].ipam.ranges[0][0].gateway")
25+
source /etc/os-release
26+
if [[ $ID == rhel ]]; then
27+
GATEWAY_IP=$(${CONTAINER_RUNTIME} network inspect org.osbuild.koji | jq -r ".[0].subnets[0].gateway")
28+
else
29+
GATEWAY_IP=$(${CONTAINER_RUNTIME} network inspect org.osbuild.koji | jq -r ".[0].plugins[0].ipam.ranges[0][0].gateway")
30+
fi
2631
echo "Gateway IP is $GATEWAY_IP"
2732

2833
# maybe copy the 'builder' plugin to the share dir

0 commit comments

Comments
 (0)