don't announce preview environment till it can be pinged (#30682)

This commit is contained in:
Peter Bengtsson 2022-09-12 18:23:39 +02:00 коммит произвёл GitHub
Родитель f1efbd0460
Коммит 6a50007f81
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -217,3 +217,17 @@ jobs:
dockerRegistryUrl="${{ secrets.NONPROD_REGISTRY_SERVER }}"
dockerRegistryUsername="${{ env.NONPROD_REGISTRY_USERNAME }}"
dockerRegistryPassword="${{ secrets.NONPROD_REGISTRY_PASSWORD }}"
- name: Check that it can reached
# To match the "Run ARM deploy" step above
if: ${{ !github.event.pull_request.auto_merge }}
# This introduces a necessary delay. Because the preview evironment
# URL is announced to the pull request as soon as all the steps
# finish, what sometimes happens is that a viewer of the PR clicks
# that link too fast and are confronted with a broken page.
# It's because there's a delay between the `azure/arm-deploy`
# and when the server is actually started and can receive and
# process requests.
# By introducing a slight "delay" here we avoid announcing a
# preview environment URL that isn't actually working just yet.
run: curl --retry-connrefused --retry 5 -I ${{ env.APP_URL }}