File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -42,19 +42,21 @@ git commit -m "${COMMIT_MESSAGE}"
42
42
git push --quiet --set-upstream origin-pages gh-pages
43
43
44
44
# Wait up to 10 minutes for the new GH pages
45
- echo waiting for the new release to appear in github
46
- attempts=60
45
+ echo " waiting for the new release to appear in github"
46
+ attempts=6
47
47
sleep_time=10
48
48
for (( i= 0 ; i< ${attempts} ; i++ )) ; do
49
49
# Notice we must use "|| :" at the end of grep because when it doesn't find a match
50
50
# it returns an exit code 1, which trips this script (it has "set -e").
51
- count=$( curl -s https://snyk.github.io/kubernetes-monitor/snyk-monitor/values.yaml | grep --line-buffered -c " tag: ${NEW_TAG} " || :)
51
+ curl_response=$( curl -s --connect-timeout 10 --max-time 10 https://snyk.github.io/kubernetes-monitor/snyk-monitor/values.yaml)
52
+ count=$( echo " $curl_response " | grep --line-buffered -c " tag: ${NEW_TAG} " || :)
52
53
if [[ " $count " == " 1" ]]; then
53
- attempts= ${i}
54
+ echo " ok, tag is updated, made $(( $i + 1 )) attempt(s) "
54
55
break
55
56
fi
57
+ echo " attempt ${i} : did not find the expected tag ${NEW_TAG} , here is what curl returned"
58
+ echo " $curl_response "
56
59
sleep $sleep_time
57
60
done
58
- echo it took github $(( $attempts * $sleep_time )) seconds to update the github pages
59
61
60
62
./scripts/slack-notify-push.sh " gh-pages"
You can’t perform that action at this time.
0 commit comments