File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 2222 ENDPOINT=" https://pr-${PR_NUMBER} .${DNS_ZONE_NAME} /sha"
2323fi
2424
25- TIMEOUT=300
25+ # Script timeout and check interval in seconds
26+ TIMEOUT=$(( 15 * 60 ))
2627INTERVAL=5
2728
2829start_time=$( date +%s)
2930
3031while true ; do
31- if ACTUAL_SHA=$( curl -fsSL " $ENDPOINT " 2> /dev/null) ; then
32- echo " Endpoint responded: $ACTUAL_SHA "
33- if [ " $ACTUAL_SHA " = " $EXPECTED_SHA " ]; then
34- echo " ✅ SHA matches expected commit: $EXPECTED_SHA "
35- exit 0
36- else
37- echo " ❌ SHA mismatch. Expected $EXPECTED_SHA but got $ACTUAL_SHA "
38- exit 1
39- fi
32+ # Send request to /sha URL. Only print the sha and fail if required.
33+ # It should fail initially until front door presents the right certificate.
34+ if ACTUAL_SHA=$( curl -fsS " $ENDPOINT " 2> /dev/null) ; then
35+ echo " Endpoint responded: $ACTUAL_SHA "
36+ if [ " $ACTUAL_SHA " = " $EXPECTED_SHA " ]; then
37+ echo " ✅ SHA matches expected commit: $EXPECTED_SHA "
38+ exit 0
39+ else
40+ echo " ❌ SHA mismatch. Expected $EXPECTED_SHA but got $ACTUAL_SHA "
41+ fi
4042 fi
4143
4244 now=$( date +%s)
You can’t perform that action at this time.
0 commit comments