From a1ad3623adadf1730e6ca15683e79d43bd90f1f8 Mon Sep 17 00:00:00 2001 From: Kevin Heis Date: Fri, 31 Mar 2023 10:32:09 -0700 Subject: [PATCH 1/3] Update find-orphaned-assets.js --- script/find-orphaned-assets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/find-orphaned-assets.js b/script/find-orphaned-assets.js index 2649314ebdc9..76542aee24ef 100755 --- a/script/find-orphaned-assets.js +++ b/script/find-orphaned-assets.js @@ -69,7 +69,7 @@ async function main(opts) { if (!fs.existsSync(dir)) { throw new Error( `${dir} does not exist. ` + - "Get around this by using the flag `--exclude-translations`. Or set up the TRANSLATION_ROOT." + 'Get around this by using the flag `--exclude-translations`. Or set up the TRANSLATION_ROOT.' ) } const languageFiles = [] From ada1dedf261acffca6461de8c9d64e6bc5f5203b Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Fri, 31 Mar 2023 13:34:01 -0400 Subject: [PATCH 2/3] Fail if the preview URL ultimately fails (#36077) --- .github/workflows/azure-preview-env-deploy.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/azure-preview-env-deploy.yml b/.github/workflows/azure-preview-env-deploy.yml index 18d74a74d283..6b8b322b3654 100644 --- a/.github/workflows/azure-preview-env-deploy.yml +++ b/.github/workflows/azure-preview-env-deploy.yml @@ -47,9 +47,9 @@ jobs: # See https://bit.ly/3qB9nZW > If a job in a workflow is skipped due to a conditional, it will report its status as "Success". if: | ( - (github.event.pull_request.head.sha || github.event.inputs.COMMIT_REF) + (github.event.pull_request.head.sha || github.event.inputs.COMMIT_REF) && (github.event.number || github.event.inputs.PR_NUMBER || github.run_id) - ) + ) && (github.repository == 'github/docs-internal' || github.repository == 'github/docs') && github.actor != 'dependabot[bot]' timeout-minutes: 15 @@ -213,7 +213,7 @@ jobs: dockerRegistryUsername="${{ env.NONPROD_REGISTRY_USERNAME }}" dockerRegistryPassword="${{ secrets.NONPROD_REGISTRY_PASSWORD }}" - - name: Check that it can reached + - name: Check that it can be reached # 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 @@ -223,4 +223,8 @@ jobs: # 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 }} + # Note the use of `--fail`. It which means that if it actually + # did connect but the error code was >=400, the command will fail. + # The `--fail --retry N` combination means that a 4xx response + # code will exit immediately but a 5xx will exhaust the retries. + run: curl --fail --retry-connrefused --retry 5 -I ${{ env.APP_URL }} From fc0184aa685fa52058e4916a54879c2bf1b5cba3 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Fri, 31 Mar 2023 13:45:31 -0400 Subject: [PATCH 3/3] fix azure preview deployments (#36087) --- .github/workflows/azure-preview-env-deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/azure-preview-env-deploy.yml b/.github/workflows/azure-preview-env-deploy.yml index 6b8b322b3654..948f282b3f42 100644 --- a/.github/workflows/azure-preview-env-deploy.yml +++ b/.github/workflows/azure-preview-env-deploy.yml @@ -192,6 +192,8 @@ jobs: cache-to: '' build-args: | BUILD_SHA=${{ env.COMMIT_REF }} + HYDRO_SECRET= + HYDRO_ENDPOINT= # Succeed despite any non-zero exit code (e.g. if there is no deployment to cancel) - name: 'Cancel any existing deployments for this PR'