diff --git a/.azure-pipelines/common-templates/install-tools.yml b/.azure-pipelines/common-templates/install-tools.yml index c1f65040840..7f856692bf4 100644 --- a/.azure-pipelines/common-templates/install-tools.yml +++ b/.azure-pipelines/common-templates/install-tools.yml @@ -27,11 +27,11 @@ steps: script: | Write-Output $PSVersionTable - - task: NodeTool@0 + - task: UseNode@1 displayName: Install NodeJs retryCountOnTaskFailure: 2 inputs: - versionSpec: 18.x + version: 22.x - task: PowerShell@2 displayName: Configure private npm feed diff --git a/tools/GenerateModules.ps1 b/tools/GenerateModules.ps1 index a9db04f30bb..d9cda1b1595 100644 --- a/tools/GenerateModules.ps1 +++ b/tools/GenerateModules.ps1 @@ -160,7 +160,7 @@ $AutoRestTempFolder | ForEach-Object { $Stopwatch = [system.diagnostics.stopwatch]::StartNew() $CpuCount = (Get-CimInstance Win32_Processor | Measure-Object -Property NumberOfLogicalProcessors -Sum).Sum -$Throttle = [int][math]::Max(1, [math]::Min(4, $CpuCount / 2)) # Use half the CPU count but max 4, min 1 +$Throttle = [int][math]::Max(1, [math]::Min(2, $CpuCount / 2)) # Use half the CPU count but max 2, min 1 $Results = $ModuleToGenerate | ForEach-Object -Parallel { $Module = $_ Write-Host -ForegroundColor Green "-------------'Generating $Module'-------------"