diff --git a/.drone.yml b/.drone.yml index d37af44..0c4ea4d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -152,7 +152,7 @@ steps: for DEPLOY in realestate-crawler-api realestate-crawler-celery realestate-crawler-celery-beat; do echo "Verifying $DEPLOY..." - PODS_API="${BASE_API}?labelSelector=app%3D${DEPLOY}" + PODS_API="$BASE_API?labelSelector=app%3D$DEPLOY" FOUND=0 for i in $(seq 1 60); do @@ -165,10 +165,10 @@ steps: (.spec.containers[]? | .image == $img) ) | {name: .metadata.name, age: (now - (.status.startTime | fromdateiso8601) | floor), image: .spec.containers[0].image, started: .status.startTime}]') - COUNT=$(echo "$RESULT" | jq 'length') + COUNT=$(echo "$RESULT" | jq 'length' 2>/dev/null || echo 0) echo " Attempt $i/60: $COUNT pod(s) younger than 60s, ready, running $EXPECTED_IMAGE" - if [ "$COUNT" -gt 0 ]; then + if [ "$COUNT" -gt 0 ] 2>/dev/null; then echo "$RESULT" | jq -r '.[] | " \(.name) age=\(.age)s image=\(.image) started=\(.started)"' echo "$DEPLOY is live!" FOUND=1