From 680e3b02379ef29e60b04684f09b4800c0efd796 Mon Sep 17 00:00:00 2001 From: Robo Date: Fri, 31 Jan 2025 18:27:39 +0900 Subject: [PATCH] ci: fix installation of build dependencies (#239290) * ci: fix installation of build dependencies * ci: add missing quality parameter --- build/azure-pipelines/alpine/cli-build-alpine.yml | 8 +++++--- .../darwin/product-build-darwin-cli-sign.yml | 12 ++++++++++++ .../darwin/product-build-darwin-universal.yml | 2 ++ build/azure-pipelines/linux/cli-build-linux.yml | 2 ++ .../linux/product-build-linux-legacy-server.yml | 2 ++ build/azure-pipelines/linux/product-build-linux.yml | 2 ++ build/azure-pipelines/product-build.yml | 2 ++ build/azure-pipelines/product-publish.yml | 2 ++ .../win32/product-build-win32-cli-sign.yml | 12 ++++++++++++ 9 files changed, 41 insertions(+), 3 deletions(-) diff --git a/build/azure-pipelines/alpine/cli-build-alpine.yml b/build/azure-pipelines/alpine/cli-build-alpine.yml index 07321ebcd97be..145133481f265 100644 --- a/build/azure-pipelines/alpine/cli-build-alpine.yml +++ b/build/azure-pipelines/alpine/cli-build-alpine.yml @@ -19,13 +19,15 @@ steps: nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}: + - template: ../cli/cli-apply-patches.yml@self + - script: | set -e npm ci workingDirectory: build - displayName: Install pipeline build - - - template: ../cli/cli-apply-patches.yml@self + env: + GITHUB_TOKEN: "$(github-distro-mixin-password)" + displayName: Install build dependencies - task: Npm@1 displayName: Download openssl prebuilt 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 32615c5846377..b3d01ca7ff167 100644 --- a/build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml +++ b/build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml @@ -3,6 +3,8 @@ parameters: type: boolean - name: VSCODE_BUILD_MACOS_ARM64 type: boolean + - name: VSCODE_QUALITY + type: string steps: - task: NodeTool@0 @@ -11,6 +13,14 @@ steps: versionFilePath: .nvmrc nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download + - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}: + - task: AzureKeyVault@2 + displayName: "Azure Key Vault: Get Secrets" + inputs: + azureSubscription: vscode + KeyVaultName: vscode-build-secrets + SecretsFilter: "github-distro-mixin-password" + - script: node build/setup-npm-registry.js $NPM_REGISTRY build condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM Registry @@ -43,6 +53,8 @@ steps: echo "Npm install failed $i, trying again..." done workingDirectory: build + env: + GITHUB_TOKEN: "$(github-distro-mixin-password)" displayName: Install build dependencies - template: ../cli/cli-darwin-sign.yml@self diff --git a/build/azure-pipelines/darwin/product-build-darwin-universal.yml b/build/azure-pipelines/darwin/product-build-darwin-universal.yml index 27408f71432e2..3bb62e1540341 100644 --- a/build/azure-pipelines/darwin/product-build-darwin-universal.yml +++ b/build/azure-pipelines/darwin/product-build-darwin-universal.yml @@ -46,6 +46,8 @@ steps: echo "Npm install failed $i, trying again..." done workingDirectory: build + env: + GITHUB_TOKEN: "$(github-distro-mixin-password)" displayName: Install build dependencies - download: current diff --git a/build/azure-pipelines/linux/cli-build-linux.yml b/build/azure-pipelines/linux/cli-build-linux.yml index 89bc8a39e24f4..dba949395de3d 100644 --- a/build/azure-pipelines/linux/cli-build-linux.yml +++ b/build/azure-pipelines/linux/cli-build-linux.yml @@ -72,6 +72,8 @@ steps: echo "Npm install failed $i, trying again..." done workingDirectory: build + env: + GITHUB_TOKEN: "$(github-distro-mixin-password)" displayName: Install build dependencies - script: | diff --git a/build/azure-pipelines/linux/product-build-linux-legacy-server.yml b/build/azure-pipelines/linux/product-build-linux-legacy-server.yml index 6e4022b406497..4c26baf2f999b 100644 --- a/build/azure-pipelines/linux/product-build-linux-legacy-server.yml +++ b/build/azure-pipelines/linux/product-build-linux-legacy-server.yml @@ -97,6 +97,8 @@ steps: echo "Npm install failed $i, trying again..." done workingDirectory: build + env: + GITHUB_TOKEN: "$(github-distro-mixin-password)" displayName: Install build dependencies - script: | diff --git a/build/azure-pipelines/linux/product-build-linux.yml b/build/azure-pipelines/linux/product-build-linux.yml index b87a82b9fb3e8..b9300b1ccba04 100644 --- a/build/azure-pipelines/linux/product-build-linux.yml +++ b/build/azure-pipelines/linux/product-build-linux.yml @@ -111,6 +111,8 @@ steps: echo "Npm install failed $i, trying again..." done workingDirectory: build + env: + GITHUB_TOKEN: "$(github-distro-mixin-password)" displayName: Install build dependencies condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) diff --git a/build/azure-pipelines/product-build.yml b/build/azure-pipelines/product-build.yml index 39075d822831b..ee7dcb99eeab7 100644 --- a/build/azure-pipelines/product-build.yml +++ b/build/azure-pipelines/product-build.yml @@ -406,6 +406,7 @@ extends: steps: - template: build/azure-pipelines/win32/product-build-win32-cli-sign.yml@self parameters: + VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }} VSCODE_BUILD_WIN32: ${{ parameters.VSCODE_BUILD_WIN32 }} VSCODE_BUILD_WIN32_ARM64: ${{ parameters.VSCODE_BUILD_WIN32_ARM64 }} @@ -706,6 +707,7 @@ extends: steps: - template: build/azure-pipelines/darwin/product-build-darwin-cli-sign.yml@self parameters: + VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }} VSCODE_BUILD_MACOS: ${{ parameters.VSCODE_BUILD_MACOS }} VSCODE_BUILD_MACOS_ARM64: ${{ parameters.VSCODE_BUILD_MACOS_ARM64 }} diff --git a/build/azure-pipelines/product-publish.yml b/build/azure-pipelines/product-publish.yml index c9728a2a113cd..8ecf5e6238ef7 100644 --- a/build/azure-pipelines/product-publish.yml +++ b/build/azure-pipelines/product-publish.yml @@ -26,6 +26,8 @@ steps: - pwsh: | npm ci workingDirectory: build + env: + GITHUB_TOKEN: "$(github-distro-mixin-password)" displayName: Install build dependencies - download: current 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 9d9af45d47473..c7f4b0a0a1277 100644 --- a/build/azure-pipelines/win32/product-build-win32-cli-sign.yml +++ b/build/azure-pipelines/win32/product-build-win32-cli-sign.yml @@ -3,6 +3,8 @@ parameters: type: boolean - name: VSCODE_BUILD_WIN32_ARM64 type: boolean + - name: VSCODE_QUALITY + type: string steps: - task: NodeTool@0 @@ -12,6 +14,14 @@ steps: versionFilePath: .nvmrc nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download + - ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}: + - task: AzureKeyVault@2 + displayName: "Azure Key Vault: Get Secrets" + inputs: + azureSubscription: vscode + KeyVaultName: vscode-build-secrets + SecretsFilter: "github-distro-mixin-password" + - powershell: node build/setup-npm-registry.js $env:NPM_REGISTRY build condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM Registry @@ -39,6 +49,8 @@ steps: $ErrorActionPreference = "Stop" exec { npm ci } workingDirectory: build + env: + GITHUB_TOKEN: "$(github-distro-mixin-password)" retryCountOnTaskFailure: 5 displayName: Install build dependencies