Skip to content

Commit c2e53c3

Browse files
test
Signed-off-by: chahat sagar <[email protected]>
1 parent 9d48bc9 commit c2e53c3

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

scripts/build/build-hotrod-image.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,22 @@ if [[ "${runtime}" == "k8s" ]]; then
133133

134134
echo '::group:: run on Kubernetes'
135135
echo '::group:: Loading images into Kind cluster'
136-
docker pull localhost:5000/jaegertracing/all-in-one:${GITHUB_SHA}
136+
137+
# Check available Kind clusters
138+
echo "Available Kind clusters:"
139+
kind get clusters || echo "No clusters found"
140+
141+
if [[ "$jaeger_version" == "v1" ]]; then
142+
JAEGER_IMAGE_NAME="jaegertracing/all-in-one"
143+
else
144+
JAEGER_IMAGE_NAME="jaegertracing/jaeger"
145+
fi
146+
147+
docker pull localhost:5000/${JAEGER_IMAGE_NAME}:${GITHUB_SHA}
137148
docker pull localhost:5000/jaegertracing/example-hotrod:${GITHUB_SHA}
138-
docker tag localhost:5000/jaegertracing/all-in-one:${GITHUB_SHA} jaegertracing/all-in-one:latest
149+
docker tag localhost:5000/${JAEGER_IMAGE_NAME}:${GITHUB_SHA} ${JAEGER_IMAGE_NAME}:latest
139150
docker tag localhost:5000/jaegertracing/example-hotrod:${GITHUB_SHA} jaegertracing/example-hotrod:latest
151+
140152
# Check available Kind clusters
141153
echo "Available Kind clusters:"
142154
kind get clusters || echo "No clusters found"
@@ -145,7 +157,7 @@ if [[ "${runtime}" == "k8s" ]]; then
145157
CLUSTER_NAME=$(kind get clusters | head -n1)
146158
if [[ -n "$CLUSTER_NAME" ]]; then
147159
echo "Loading images into '$CLUSTER_NAME' cluster..."
148-
kind load docker-image jaegertracing/all-in-one:latest --name "$CLUSTER_NAME"
160+
kind load docker-image ${JAEGER_IMAGE_NAME}:latest --name "$CLUSTER_NAME"
149161
kind load docker-image jaegertracing/example-hotrod:latest --name "$CLUSTER_NAME"
150162
else
151163
echo "No Kind clusters found!"

0 commit comments

Comments
 (0)