From e22f9d7d70e61b8b0cfe1c0adacee69bf6f8365b Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Fri, 13 Aug 2021 16:12:24 -0700 Subject: Update VMs for Patch Tuesday, 2021-08-11 (#19508) * Deploy SDKs with full features first to ensure we get Debugging Tools for Windows. * Update VMs for Patch Tuesday, 2021-08-11 --- scripts/azure-pipelines/azure-pipelines.yml | 4 +- scripts/azure-pipelines/windows/create-vmss.ps1 | 4 +- .../windows/deploy-windows-sdks.ps1 | 49 ++++++++++++++++++++++ .../azure-pipelines/windows/deploy-windows-wdk.ps1 | 47 --------------------- .../windows/provision-entire-image.ps1 | 2 +- 5 files changed, 54 insertions(+), 52 deletions(-) create mode 100644 scripts/azure-pipelines/windows/deploy-windows-sdks.ps1 delete mode 100644 scripts/azure-pipelines/windows/deploy-windows-wdk.ps1 (limited to 'scripts') diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index 9b509ea1f..474dbd254 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -2,8 +2,8 @@ # SPDX-License-Identifier: MIT # variables: - windows-pool: 'PrWin-2021-07-14' - linux-pool: 'PrLin-2021-07-14' + windows-pool: 'PrWin-2021-08-12' + linux-pool: 'PrLin-2021-08-11' osx-pool: 'PrOsx-2021-07-27' stages: diff --git a/scripts/azure-pipelines/windows/create-vmss.ps1 b/scripts/azure-pipelines/windows/create-vmss.ps1 index 7e93dded4..c9f299225 100644 --- a/scripts/azure-pipelines/windows/create-vmss.ps1 +++ b/scripts/azure-pipelines/windows/create-vmss.ps1 @@ -362,11 +362,11 @@ function Invoke-ScriptWithPrefix { } } -Invoke-ScriptWithPrefix -ScriptName 'deploy-visual-studio.ps1' -AddAdminPw +Invoke-ScriptWithPrefix -ScriptName 'deploy-windows-sdks.ps1' -AddAdminPw Restart-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName #################################################################################################### -Invoke-ScriptWithPrefix -ScriptName 'deploy-windows-wdk.ps1' -AddAdminPw +Invoke-ScriptWithPrefix -ScriptName 'deploy-visual-studio.ps1' -AddAdminPw Restart-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName #################################################################################################### diff --git a/scripts/azure-pipelines/windows/deploy-windows-sdks.ps1 b/scripts/azure-pipelines/windows/deploy-windows-sdks.ps1 new file mode 100644 index 000000000..9c6ca0a5d --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-windows-sdks.ps1 @@ -0,0 +1,49 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1 + +# REPLACE WITH UTILITY-PREFIX.ps1 + +<# +.SYNOPSIS +Installs Windows PSDK/WDK + +.DESCRIPTION +Downloads the Windows PSDK/DDK installer located at $Url, and installs it with the +correct flags. + +.PARAMETER Url +The URL of the installer. +#> +Function InstallWindowsDK { + Param( + [String]$Url + ) + + try { + Write-Host "Downloading Windows PSDK or DDK $Url..." + [string]$installerPath = Get-TempFilePath -Extension 'exe' + curl.exe -L -o $installerPath -s -S $Url + Write-Host 'Installing...' + $proc = Start-Process -FilePath $installerPath -ArgumentList @('/features', '+', '/q') -Wait -PassThru + $exitCode = $proc.ExitCode + if ($exitCode -eq 0) { + Write-Host 'Installation successful!' + } + else { + Write-Error "Installation failed! Exited with $exitCode." + throw + } + } + catch { + Write-Error "Failed to install Windows PSDK or DDK! $($_.Exception.Message)" + throw + } +} + +# Windows 10 SDK, version 2004 (10.0.19041.0) +InstallWindowsDK 'https://go.microsoft.com/fwlink/?linkid=2120843' + +# Windows 10 WDK, version 2004 +InstallWindowsDK 'https://go.microsoft.com/fwlink/?linkid=2128854' diff --git a/scripts/azure-pipelines/windows/deploy-windows-wdk.ps1 b/scripts/azure-pipelines/windows/deploy-windows-wdk.ps1 deleted file mode 100644 index d145f79d7..000000000 --- a/scripts/azure-pipelines/windows/deploy-windows-wdk.ps1 +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# SPDX-License-Identifier: MIT - -# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1 - -# REPLACE WITH UTILITY-PREFIX.ps1 - -$WindowsWDKUrl = 'https://go.microsoft.com/fwlink/?linkid=2128854' - -<# -.SYNOPSIS -Installs Windows WDK version 2004 - -.DESCRIPTION -Downloads the Windows WDK installer located at $Url, and installs it with the -correct flags. - -.PARAMETER Url -The URL of the installer. -#> -Function InstallWindowsWDK { - Param( - [String]$Url - ) - - try { - Write-Host 'Downloading Windows WDK...' - [string]$installerPath = Get-TempFilePath -Extension 'exe' - curl.exe -L -o $installerPath -s -S $Url - Write-Host 'Installing Windows WDK...' - $proc = Start-Process -FilePath $installerPath -ArgumentList @('/features', '+', '/q') -Wait -PassThru - $exitCode = $proc.ExitCode - if ($exitCode -eq 0) { - Write-Host 'Installation successful!' - } - else { - Write-Error "Installation failed! Exited with $exitCode." - throw - } - } - catch { - Write-Error "Failed to install Windows WDK! $($_.Exception.Message)" - throw - } -} - -InstallWindowsWDK -Url $WindowsWDKUrl diff --git a/scripts/azure-pipelines/windows/provision-entire-image.ps1 b/scripts/azure-pipelines/windows/provision-entire-image.ps1 index 9e1c1b268..00c2d28ca 100644 --- a/scripts/azure-pipelines/windows/provision-entire-image.ps1 +++ b/scripts/azure-pipelines/windows/provision-entire-image.ps1 @@ -4,8 +4,8 @@ . "$PSScriptRoot\utility-prefix.ps1" . "$PSScriptRoot\deploy-tlssettings.ps1" -RebootIfRequired 0 +. "$PSScriptRoot\deploy-windows-sdks.ps1" . "$PSScriptRoot\deploy-visual-studio.ps1" -. "$PSScriptRoot\deploy-windows-wdk.ps1" . "$PSScriptRoot\deploy-mpi.ps1" . "$PSScriptRoot\deploy-cuda.ps1" . "$PSScriptRoot\deploy-inteloneapi.ps1" -- cgit v1.2.3