Commit 6f31147 1 parent 78bea51 commit 6f31147 Copy full SHA for 6f31147
File tree 1 file changed +20
-14
lines changed
1 file changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -291,20 +291,26 @@ jobs:
291
291
CLUSTER_API_GATEWAY_ENDPOINT=${{ steps.bootstrap_cluster.outputs.cluster_api_gateway_endpoint }}
292
292
CLUSTER_UUID=${{ steps.bootstrap_cluster.outputs.cluster_id }}
293
293
CLUSTER_SECRET=${{ steps.bootstrap_cluster.outputs.cluster_secret }}
294
-
295
- response=$(curl -s -X GET "$CLUSTER_API_GATEWAY_ENDPOINT/cluster/$CLUSTER_UUID" \
296
- -H "Content-Type : application/json" \
297
- -H "Authorization : $CLUSTER_UUID $CLUSTER_SECRET")
298
-
299
- status=$(echo $response | jq -r '.results[0].status')
300
-
301
- if [ "$status" != "active" ]; then
302
- echo "Cluster status is not active, current status : $status"
303
- exit 1
304
- else
305
- echo "Cluster status is active"
306
- exit 0
307
- fi
294
+ n=0
295
+ until [ "$n" -ge 60 ]
296
+ do
297
+ response=$(curl -s -X GET "$CLUSTER_API_GATEWAY_ENDPOINT/cluster/$CLUSTER_UUID" \
298
+ -H "Content-Type: application/json" \
299
+ -H "Authorization: $CLUSTER_UUID $CLUSTER_SECRET")
300
+
301
+ status=$(echo $response | jq -r '.results[0].status')
302
+
303
+ if [ "$status" != "active" ]; then
304
+ echo "Cluster status is not active, current status: $status, retrying"
305
+ n=$((n+1))
306
+ sleep 10
307
+ else
308
+ echo "Cluster status is active"
309
+ exit 0
310
+ fi
311
+ done
312
+ echo "Cluster status is not active"
313
+ exit 1
308
314
309
315
- name : Record Test Start Time
310
316
run : echo "TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments