From 417e17038cd0cc2e351fa05016e3b7e6d6336580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Fri, 20 Oct 2023 09:53:57 +0200 Subject: [PATCH] Use NodeJS mirror for more reliable downloads (#196038) get node from mirror --- .nvmrc | 2 +- build/azure-pipelines/alpine/cli-build-alpine.yml | 1 + build/azure-pipelines/alpine/product-build-alpine.yml | 1 + build/azure-pipelines/darwin/cli-build-darwin.yml | 1 + build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml | 1 + build/azure-pipelines/darwin/product-build-darwin-sign.yml | 1 + build/azure-pipelines/darwin/product-build-darwin-universal.yml | 1 + build/azure-pipelines/darwin/product-build-darwin.yml | 1 + build/azure-pipelines/distro-build.yml | 1 + build/azure-pipelines/linux/cli-build-linux.yml | 1 + build/azure-pipelines/linux/product-build-linux.yml | 1 + build/azure-pipelines/linux/snap-build-linux.yml | 1 + build/azure-pipelines/oss/product-build-pr-cache-linux.yml | 1 + build/azure-pipelines/oss/product-build-pr-cache-win32.yml | 1 + build/azure-pipelines/product-compile.yml | 1 + build/azure-pipelines/product-publish.yml | 1 + build/azure-pipelines/product-release.yml | 1 + build/azure-pipelines/publish-types/publish-types.yml | 1 + build/azure-pipelines/sdl-scan.yml | 2 ++ build/azure-pipelines/web/product-build-web.yml | 1 + build/azure-pipelines/win32/cli-build-win32.yml | 1 + build/azure-pipelines/win32/product-build-win32-cli-sign.yml | 1 + build/azure-pipelines/win32/product-build-win32.yml | 1 + 23 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index aacb5181047..4a1f488b6c3 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.17 +18.17.1 diff --git a/build/azure-pipelines/alpine/cli-build-alpine.yml b/build/azure-pipelines/alpine/cli-build-alpine.yml index d10fbe898e4..4e8352ceecc 100644 --- a/build/azure-pipelines/alpine/cli-build-alpine.yml +++ b/build/azure-pipelines/alpine/cli-build-alpine.yml @@ -13,6 +13,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}: # Install yarn as the ARM64 build agent is using vanilla Ubuntu diff --git a/build/azure-pipelines/alpine/product-build-alpine.yml b/build/azure-pipelines/alpine/product-build-alpine.yml index 77f97561426..b055a0ae3d0 100644 --- a/build/azure-pipelines/alpine/product-build-alpine.yml +++ b/build/azure-pipelines/alpine/product-build-alpine.yml @@ -3,6 +3,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - template: ../distro/download-distro.yml diff --git a/build/azure-pipelines/darwin/cli-build-darwin.yml b/build/azure-pipelines/darwin/cli-build-darwin.yml index 0bf063276ca..caaebc555e2 100644 --- a/build/azure-pipelines/darwin/cli-build-darwin.yml +++ b/build/azure-pipelines/darwin/cli-build-darwin.yml @@ -16,6 +16,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}: - template: ../cli/cli-apply-patches.yml diff --git a/build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml b/build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml index 87d631ddc47..6f4132f45ff 100644 --- a/build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml +++ b/build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml @@ -9,6 +9,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - script: node build/setup-npm-registry.js $NPM_REGISTRY build condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none')) diff --git a/build/azure-pipelines/darwin/product-build-darwin-sign.yml b/build/azure-pipelines/darwin/product-build-darwin-sign.yml index 5cf10f9f7e4..59f4821c1f1 100644 --- a/build/azure-pipelines/darwin/product-build-darwin-sign.yml +++ b/build/azure-pipelines/darwin/product-build-darwin-sign.yml @@ -3,6 +3,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - task: UseDotNet@2 inputs: diff --git a/build/azure-pipelines/darwin/product-build-darwin-universal.yml b/build/azure-pipelines/darwin/product-build-darwin-universal.yml index b59866f4664..1c21bb778ce 100644 --- a/build/azure-pipelines/darwin/product-build-darwin-universal.yml +++ b/build/azure-pipelines/darwin/product-build-darwin-universal.yml @@ -3,6 +3,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - template: ../distro/download-distro.yml diff --git a/build/azure-pipelines/darwin/product-build-darwin.yml b/build/azure-pipelines/darwin/product-build-darwin.yml index 4a4c587c7aa..64e5b60e7bc 100644 --- a/build/azure-pipelines/darwin/product-build-darwin.yml +++ b/build/azure-pipelines/darwin/product-build-darwin.yml @@ -20,6 +20,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}: - template: ../distro/download-distro.yml diff --git a/build/azure-pipelines/distro-build.yml b/build/azure-pipelines/distro-build.yml index 552aced7685..c0a8e354c7b 100644 --- a/build/azure-pipelines/distro-build.yml +++ b/build/azure-pipelines/distro-build.yml @@ -11,4 +11,5 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - template: ./distro/download-distro.yml diff --git a/build/azure-pipelines/linux/cli-build-linux.yml b/build/azure-pipelines/linux/cli-build-linux.yml index 4a0602655f0..0a0ece436b0 100644 --- a/build/azure-pipelines/linux/cli-build-linux.yml +++ b/build/azure-pipelines/linux/cli-build-linux.yml @@ -19,6 +19,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}: - template: ../cli/cli-apply-patches.yml diff --git a/build/azure-pipelines/linux/product-build-linux.yml b/build/azure-pipelines/linux/product-build-linux.yml index b2c993b4a14..a8d434b135a 100644 --- a/build/azure-pipelines/linux/product-build-linux.yml +++ b/build/azure-pipelines/linux/product-build-linux.yml @@ -22,6 +22,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}: - template: ../distro/download-distro.yml diff --git a/build/azure-pipelines/linux/snap-build-linux.yml b/build/azure-pipelines/linux/snap-build-linux.yml index 7f00653a4bd..6fc16833921 100644 --- a/build/azure-pipelines/linux/snap-build-linux.yml +++ b/build/azure-pipelines/linux/snap-build-linux.yml @@ -3,6 +3,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - task: DownloadPipelineArtifact@0 displayName: "Download Pipeline Artifact" diff --git a/build/azure-pipelines/oss/product-build-pr-cache-linux.yml b/build/azure-pipelines/oss/product-build-pr-cache-linux.yml index f572c6fe688..9f207f75220 100644 --- a/build/azure-pipelines/oss/product-build-pr-cache-linux.yml +++ b/build/azure-pipelines/oss/product-build-pr-cache-linux.yml @@ -7,6 +7,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - script: node build/setup-npm-registry.js $NPM_REGISTRY condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none')) diff --git a/build/azure-pipelines/oss/product-build-pr-cache-win32.yml b/build/azure-pipelines/oss/product-build-pr-cache-win32.yml index e4d70f0c7d7..b084c5e97c5 100644 --- a/build/azure-pipelines/oss/product-build-pr-cache-win32.yml +++ b/build/azure-pipelines/oss/product-build-pr-cache-win32.yml @@ -7,6 +7,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - powershell: node build/setup-npm-registry.js $env:NPM_REGISTRY condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none')) diff --git a/build/azure-pipelines/product-compile.yml b/build/azure-pipelines/product-compile.yml index f089eced728..ac95819f7a9 100644 --- a/build/azure-pipelines/product-compile.yml +++ b/build/azure-pipelines/product-compile.yml @@ -7,6 +7,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}: - template: ./distro/download-distro.yml diff --git a/build/azure-pipelines/product-publish.yml b/build/azure-pipelines/product-publish.yml index 32b0f730551..df6ac09de76 100644 --- a/build/azure-pipelines/product-publish.yml +++ b/build/azure-pipelines/product-publish.yml @@ -3,6 +3,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - task: AzureKeyVault@1 displayName: "Azure Key Vault: Get Secrets" diff --git a/build/azure-pipelines/product-release.yml b/build/azure-pipelines/product-release.yml index 7ab077f3699..dc084f5a04c 100644 --- a/build/azure-pipelines/product-release.yml +++ b/build/azure-pipelines/product-release.yml @@ -7,6 +7,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - task: AzureCLI@2 displayName: Fetch secrets diff --git a/build/azure-pipelines/publish-types/publish-types.yml b/build/azure-pipelines/publish-types/publish-types.yml index fadb7c8381f..4fc31fb6b37 100644 --- a/build/azure-pipelines/publish-types/publish-types.yml +++ b/build/azure-pipelines/publish-types/publish-types.yml @@ -14,6 +14,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - bash: | TAG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) diff --git a/build/azure-pipelines/sdl-scan.yml b/build/azure-pipelines/sdl-scan.yml index 63beec73d02..165d4d00a86 100644 --- a/build/azure-pipelines/sdl-scan.yml +++ b/build/azure-pipelines/sdl-scan.yml @@ -55,6 +55,7 @@ stages: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - template: ./distro/download-distro.yml @@ -197,6 +198,7 @@ stages: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - template: ./distro/download-distro.yml diff --git a/build/azure-pipelines/web/product-build-web.yml b/build/azure-pipelines/web/product-build-web.yml index 74ebc3df8f5..1cff98f82e1 100644 --- a/build/azure-pipelines/web/product-build-web.yml +++ b/build/azure-pipelines/web/product-build-web.yml @@ -3,6 +3,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - template: ../distro/download-distro.yml diff --git a/build/azure-pipelines/win32/cli-build-win32.yml b/build/azure-pipelines/win32/cli-build-win32.yml index c31ec561eb3..49eaf51c4c5 100644 --- a/build/azure-pipelines/win32/cli-build-win32.yml +++ b/build/azure-pipelines/win32/cli-build-win32.yml @@ -16,6 +16,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}: - template: ../cli/cli-apply-patches.yml diff --git a/build/azure-pipelines/win32/product-build-win32-cli-sign.yml b/build/azure-pipelines/win32/product-build-win32-cli-sign.yml index f350c1a9b29..75b855288b0 100644 --- a/build/azure-pipelines/win32/product-build-win32-cli-sign.yml +++ b/build/azure-pipelines/win32/product-build-win32-cli-sign.yml @@ -10,6 +10,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - powershell: node build/setup-npm-registry.js $env:NPM_REGISTRY build condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none')) diff --git a/build/azure-pipelines/win32/product-build-win32.yml b/build/azure-pipelines/win32/product-build-win32.yml index ab0813b9f76..4591ba6c618 100644 --- a/build/azure-pipelines/win32/product-build-win32.yml +++ b/build/azure-pipelines/win32/product-build-win32.yml @@ -22,6 +22,7 @@ steps: inputs: versionSource: fromFile versionFilePath: .nvmrc + nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - task: UsePythonVersion@0 inputs: