diff --git a/build/azure-pipelines/product-npm-package-validate.yml b/build/azure-pipelines/product-npm-package-validate.yml index c95fd22b803..05f2cd8e00e 100644 --- a/build/azure-pipelines/product-npm-package-validate.yml +++ b/build/azure-pipelines/product-npm-package-validate.yml @@ -68,19 +68,27 @@ jobs: fi echo "Attempt $attempt: Running npm ci" - if npm ci --ignore-scripts; then - echo "npm ci succeeded on attempt $attempt" - exit 0 + if npm i --ignore-scripts; then + if node build/npm/postinstall.js; then + echo "npm i succeeded on attempt $attempt" + exit 0 + else + echo "node build/npm/postinstall.js failed on attempt $attempt" + fi else - echo "npm ci failed on attempt $attempt" + echo "npm i failed on attempt $attempt" fi done - echo "npm ci failed after 6 attempts" + echo "npm i failed after 6 attempts" exit 1 env: + npm_command: 'install --ignore-scripts' ELECTRON_SKIP_BINARY_DOWNLOAD: 1 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 GITHUB_TOKEN: "$(github-distro-mixin-password)" displayName: Install dependencies with retries timeoutInMinutes: 400 + + - script: .github/workflows/check-clean-git-state.sh + displayName: Check clean git state diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js index 20234986ece..239f0688e09 100644 --- a/build/npm/postinstall.js +++ b/build/npm/postinstall.js @@ -60,7 +60,7 @@ function npmInstall(dir, opts) { run('sudo', ['chown', '-R', `${userinfo.uid}:${userinfo.gid}`, `${path.resolve(root, dir)}`], opts); } else { log(dir, 'Installing dependencies...'); - run(npm, [command], opts); + run(npm, command.split(' '), opts); } } diff --git a/test/monaco/.npmrc b/test/monaco/.npmrc new file mode 100644 index 00000000000..a9c57709666 --- /dev/null +++ b/test/monaco/.npmrc @@ -0,0 +1,2 @@ +legacy-peer-deps="true" +timeout=180000