diff --git a/build/azure-pipelines/win32/product-build-win32.yml b/build/azure-pipelines/win32/product-build-win32.yml index de14aa1a89315..3cbd999d8673d 100644 --- a/build/azure-pipelines/win32/product-build-win32.yml +++ b/build/azure-pipelines/win32/product-build-win32.yml @@ -82,10 +82,28 @@ steps: condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM Authentication + - powershell: | + mkdir -Force .build/node-gyp + displayName: Create custom node-gyp directory + condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) + + - powershell: | + . ../../build/azure-pipelines/win32/exec.ps1 + $ErrorActionPreference = "Stop" + # TODO: Should be replaced with upstream URL once https://github.com/nodejs/node-gyp/pull/2825 + # gets merged. + exec { git clone https://github.com/rzhao271/node-gyp.git . } "Cloning rzhao271/node-gyp failed" + exec { git checkout 102b347da0c92c29f9c67df22e864e70249cf086 } "Checking out 102b347 failed" + exec { npm install } "Building rzhao271/node-gyp failed" + displayName: Install custom node-gyp + workingDirectory: .build/node-gyp + condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) + - powershell: | . build/azure-pipelines/win32/exec.ps1 . build/azure-pipelines/win32/retry.ps1 $ErrorActionPreference = "Stop" + $env:npm_config_node_gyp="$(Join-Path $pwd.Path '.build/node-gyp/bin/node-gyp.js')" $env:npm_config_arch="$(VSCODE_ARCH)" $env:CHILD_CONCURRENCY="1" retry { exec { yarn --frozen-lockfile --check-files } }