File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -118,21 +118,29 @@ jobs:
118
118
sleep 30
119
119
done
120
120
121
+ # This step can time out, but it timing out doesn't necessarily mean that the webhook is not working.
122
+ # Timeouts mainly happen due to the environment of the runner and/or parallelism, thus such occurrences will simply be dismissed as warnings.
121
123
- name : Check the certificate status
122
124
run : |
123
125
max_wait_time_seconds=300
124
126
end=$(( $(date +%s) + $max_wait_time_seconds ))
125
127
start=$(date +%s)
126
128
127
129
while [ $(date +%s) -le $end ]; do
128
- kubectl get certificate/dnsimple-test -o jsonpath='{.status}'
130
+ OUT=$(kubectl get certificate/dnsimple-test -o jsonpath='{.status.conditions}')
131
+ echo -e "$OUT\n"
132
+
133
+ if [ $(echo "$OUT" | grep -iE "Failed|Denied" | wc -l) -gt 0 ]; then
134
+ echo "::Error title=Certificate resource errored::The certificate ressource has an error"
135
+ exit 1
136
+ fi
129
137
130
138
if [ $(kubectl get certificate dnsimple-test -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}') == "True" ]; then
131
139
echo "Certificate is ready after $(( $(date +%s) - $start )) seconds"
132
140
exit 0
133
141
fi
134
142
sleep 10
135
- echo " [i] New iteration at $(date)"
143
+ echo -e "\n [i] New iteration at $(date)"
136
144
done
137
145
138
146
echo "::warning title=Certificate timed out::Have timed out waiting for certificate"
You can’t perform that action at this time.
0 commit comments