Skip to content

Commit 63c3ef8

Browse files
changes
Signed-off-by: chahat sagar <[email protected]>
1 parent 7c0c256 commit 63c3ef8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

scripts/build/build-hotrod-image.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,14 @@ else
147147
echo '::endgroup::'
148148
fi
149149

150+
if [[ "${runtime}" == "k8s" ]]; then
151+
HOTROD_URL="http://localhost:8080/hotrod"
152+
JAEGER_QUERY_URL="http://localhost:16686/jaeger"
153+
else
154+
HOTROD_URL="http://localhost:8080"
155+
JAEGER_QUERY_URL="http://localhost:16686"
156+
fi
157+
150158
i=0
151159
while [[ "$(curl -s -o /dev/null -w '%{http_code}' localhost:8080)" != "200" && $i -lt 30 ]]; do
152160
sleep 1
@@ -162,7 +170,7 @@ if [[ $body != *"Rides On Demand"* ]]; then
162170
fi
163171
echo '::endgroup::'
164172

165-
response=$(curl -i -X POST "http://localhost:8080/dispatch?customer=123")
173+
response=$(curl -i -X POST "${HOTROD_URL}/dispatch?customer=123")
166174
TRACE_ID=$(echo "$response" | grep -Fi "Traceresponse:" | awk '{print $2}' | cut -d '-' -f 2)
167175

168176
if [ -n "$TRACE_ID" ]; then
@@ -172,7 +180,6 @@ else
172180
exit 1
173181
fi
174182

175-
JAEGER_QUERY_URL="http://localhost:16686"
176183
EXPECTED_SPANS=35
177184
MAX_RETRIES=30
178185
SLEEP_INTERVAL=3

0 commit comments

Comments
 (0)