Update apps/demo-nginx/Jenkinsfile

This commit is contained in:
2026-01-08 13:30:32 +00:00
parent d754f0559a
commit 1f39ba6632

View File

@@ -440,14 +440,14 @@ EOF
echo "" echo ""
echo "2. Checking running pod images..." echo "2. Checking running pod images..."
POD_IMAGES=\$(kubectl get pods -n ${NAMESPACE} -l app=${APP_NAME} \ POD_IMAGES=$(kubectl get pods -n ${NAMESPACE} -l app=${APP_NAME} \
-o jsonpath='{range .items[*]}{.spec.containers[0].image}{"\n"}{end}') -o jsonpath='{range .items[*]}{.spec.containers[0].image}{" "}{end}')
echo " Running pod images:" echo " Running pod images:"
echo "\${POD_IMAGES}" echo "${POD_IMAGES}"
echo " Expected tag: ${IMAGE_TAG}" echo " Expected tag: ${IMAGE_TAG}"
if ! echo "\${POD_IMAGES}" | grep -q "${IMAGE_TAG}"; then if ! echo "${POD_IMAGES}" | grep -q "${IMAGE_TAG}"; then
echo " ❌ FAILED: Running pods do not use expected image!" echo " ❌ FAILED: Running pods do not use expected image!"
exit 1 exit 1
fi fi
@@ -456,6 +456,7 @@ EOF
# 3. CRITICAL: Verify actual running pod images # 3. CRITICAL: Verify actual running pod images
echo "" echo ""
echo "3. Checking actual running pod images..." echo "3. Checking actual running pod images..."