From 33f6bf1309a45e0c505bc7c8738393ed90a17a24 Mon Sep 17 00:00:00 2001
From: Maksim Petrov <47208721+vmapetr@users.noreply.github.com>
Date: Tue, 5 May 2020 20:49:34 +0300
Subject: [PATCH 01/13] Improve Windows provisioners stability (#733)
* Improve Install-CloudFoundryCli.ps1
* Improve Install-Go.ps1
* Improve Install-Kind.ps1
* Improve Install-MysqlCli.ps1
* Improve Install-Rust.ps1
* Improve Install-SQLPowerShellTools.ps1
* Improve Update-AndroidSDK.ps1
* Fix issue with resolve
---
.../Installers/Install-CloudFoundryCli.ps1 | 17 +++---
images/win/scripts/Installers/Install-Go.ps1 | 28 +++++----
.../win/scripts/Installers/Install-Kind.ps1 | 9 ++-
.../scripts/Installers/Install-MysqlCli.ps1 | 13 ++---
.../win/scripts/Installers/Install-Rust.ps1 | 7 +--
.../Installers/Install-SQLPowerShellTools.ps1 | 58 ++++---------------
.../scripts/Installers/Update-AndroidSDK.ps1 | 4 +-
7 files changed, 49 insertions(+), 87 deletions(-)
diff --git a/images/win/scripts/Installers/Install-CloudFoundryCli.ps1 b/images/win/scripts/Installers/Install-CloudFoundryCli.ps1
index cc1f0b5c..194ed5a3 100644
--- a/images/win/scripts/Installers/Install-CloudFoundryCli.ps1
+++ b/images/win/scripts/Installers/Install-CloudFoundryCli.ps1
@@ -6,19 +6,18 @@
Import-Module -Name ImageHelpers
# Download the latest cf cli exe
-Invoke-WebRequest -UseBasicParsing -Uri "https://packages.cloudfoundry.org/stable?release=windows64-exe&source=github" -OutFile cf-cli.zip
+$CloudFoundryCliName = "cf-cli.zip"
+$CloudFoundryCliUrl = "https://packages.cloudfoundry.org/stable?release=windows64-exe&source=github"
+
+$CloudFoundryArchPath = Start-DownloadWithRetry -Url $CloudFoundryCliUrl -Name $CloudFoundryCliName
# Create directory for cf cli
-$cf_cli_path = "C:\cf-cli"
-New-Item -Path $cf_cli_path -ItemType Directory -Force
+$CloudFoundryCliPath = "C:\cf-cli"
+New-Item -Path $CloudFoundryCliPath -ItemType Directory -Force
# Extract the zip archive
Write-Host "Extracting cf cli..."
-Expand-Archive -Path cf-cli.zip -DestinationPath $cf_cli_path -Force
+Expand-Archive -Path $CloudFoundryArchPath -DestinationPath $CloudFoundryCliPath -Force
# Add cf to path
-Add-MachinePathItem $cf_cli_path
-
-# Delete the cfl-cli zip archive
-Write-Host "Deleting downloaded archive of cf cli"
-Remove-Item cf-cli.zip
+Add-MachinePathItem $CloudFoundryCliPath
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Install-Go.ps1 b/images/win/scripts/Installers/Install-Go.ps1
index db186186..6d98ef80 100644
--- a/images/win/scripts/Installers/Install-Go.ps1
+++ b/images/win/scripts/Installers/Install-Go.ps1
@@ -6,12 +6,13 @@
Import-Module -Name ImageHelpers -Force
$refsJson = Invoke-RestMethod "https://api.github.com/repos/golang/go/git/refs/tags"
+
function Install-GoVersion
{
Param
(
- [String]$goVersion,
- [Switch]$addToDefaultPath
+ [String] $goVersion,
+ [Switch] $addToDefaultPath
)
$latestVersionObject = $refsJson | Where-Object { $_.ref -Match "refs/tags/go$goVersion[./d]*" } | Select-Object -Last 1
@@ -20,11 +21,15 @@ function Install-GoVersion
# Download the Go zip archive.
Write-Host "Downloading Go $latestVersion..."
$ProgressPreference = 'SilentlyContinue'
- Invoke-WebRequest -UseBasicParsing -Uri "https://dl.google.com/go/go$latestVersion.windows-amd64.zip" -OutFile go$latestVersion.windows-amd64.zip
+
+ $goArchName = "go${latestVersion}.windows-amd64.zip"
+ $goArchUrl = "https://dl.google.com/go/${goArchName}"
+
+ $goArchPath = Start-DownloadWithRetry -Url $goArchUrl -Name $goArchName
# Extract the zip archive. It contains a single directory named "go".
Write-Host "Extracting Go $latestVersion..."
- Expand-Archive -Path go$latestVersion.windows-amd64.zip -DestinationPath "C:\" -Force
+ Expand-Archive -Path $goArchPath -DestinationPath "C:\" -Force
# Delete unnecessary files to conserve space
Write-Host "Cleaning directories of Go $latestVersion..."
@@ -41,10 +46,6 @@ function Install-GoVersion
$newDirName = "Go$latestVersion"
Rename-Item -path "C:\go" -newName $newDirName
- # Delete the Go zip archive.
- Write-Host "Deleting downloaded archive of Go $latestVersion..."
- Remove-Item go$latestVersion.windows-amd64.zip
-
# Make this the default version of Go?
if ($addToDefaultPath)
{
@@ -63,13 +64,18 @@ function Install-GoVersion
# Install Go
$goVersionsToInstall = $env:GO_VERSIONS.split(", ", [System.StringSplitOptions]::RemoveEmptyEntries)
-foreach($go in $goVersionsToInstall) {
+foreach ($go in $goVersionsToInstall)
+{
Write-Host "Installing Go ${go}"
- if($go -eq $env:GO_DEFAULT) {
+ if ($go -eq $env:GO_DEFAULT)
+ {
$installDirectory = Install-GoVersion -goVersion $go -addToDefaultPath
- } else {
+ }
+ else
+ {
$installDirectory = Install-GoVersion -goVersion $go
}
+
$envName = "GOROOT_{0}_{1}_X64" -f $go.split(".")
setx $envName "$installDirectory" /M
}
diff --git a/images/win/scripts/Installers/Install-Kind.ps1 b/images/win/scripts/Installers/Install-Kind.ps1
index 6093049b..12f0caa0 100644
--- a/images/win/scripts/Installers/Install-Kind.ps1
+++ b/images/win/scripts/Installers/Install-Kind.ps1
@@ -6,25 +6,24 @@
$stableKindTag = "v0.7.0"
$tagToUse = $stableKindTag;
$destFilePath = "C:\ProgramData\kind"
-$outFilePath = "C:\ProgramData\kind\kind.exe"
try
{
- $getkindUri = "https://github.com/kubernetes-sigs/kind/releases/download/$tagToUse/kind-windows-amd64"
+ $kindUrl = "https://github.com/kubernetes-sigs/kind/releases/download/$tagToUse/kind-windows-amd64"
+
Write-Host "Downloading kind.exe..."
New-Item -Path $destFilePath -ItemType Directory -Force
- Invoke-WebRequest -Uri $getkindUri -OutFile $outFilePath
+ $kindInstallerPath = Start-DownloadWithRetry -Url $kindUrl -Name "kind.exe" -DownloadPath $destFilePath
Write-Host "Starting Install kind.exe..."
- $process = Start-Process -FilePath $outFilePath -Wait -PassThru
+ $process = Start-Process -FilePath $kindInstallerPath -Wait -PassThru
$exitCode = $process.ExitCode
if ($exitCode -eq 0 -or $exitCode -eq 3010)
{
Write-Host -Object 'Installation successful'
Add-MachinePathItem $destFilePath
- exit $exitCode
}
else
{
diff --git a/images/win/scripts/Installers/Install-MysqlCli.ps1 b/images/win/scripts/Installers/Install-MysqlCli.ps1
index 348657d7..a9db2f42 100644
--- a/images/win/scripts/Installers/Install-MysqlCli.ps1
+++ b/images/win/scripts/Installers/Install-MysqlCli.ps1
@@ -3,10 +3,10 @@
## Desc: Install Mysql CLI
################################################################################
-
## Downloading mysql jar
-$uri = 'https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.21-winx64.zip'
-$mysqlPath = 'C:\mysql-5.7.21-winx64\bin'
+$MysqlVersionName = "mysql-5.7.21-winx64"
+$MysqlVersionUrl = "https://dev.mysql.com/get/Downloads/MySQL-5.7/${MysqlVersionName}.zip"
+$MysqlPath = "C:\$MysqlVersionName\bin"
# Installing visual c++ redistibutable package.
$InstallerName = "vcredist_x64.exe"
@@ -19,13 +19,10 @@ Install-Binary -Url $InstallerURI -Name $InstallerName -ArgumentList $ArgumentLi
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor "Tls12"
# Get the latest mysql command line tools .
-Invoke-WebRequest -UseBasicParsing -Uri $uri -OutFile mysql.zip
+$mysqlArchPath = Start-DownloadWithRetry -Url $MysqlVersionUrl -Name "mysql.zip"
# Expand the zip
-Expand-Archive -Path mysql.zip -DestinationPath "C:\" -Force
-
-# Deleting zip folder
-Remove-Item -Recurse -Force mysql.zip
+Expand-Archive -Path $mysqlArchPath -DestinationPath "C:\" -Force
# Adding mysql in system environment path
Add-MachinePathItem $mysqlPath
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Install-Rust.ps1 b/images/win/scripts/Installers/Install-Rust.ps1
index 61588a86..ae18371a 100644
--- a/images/win/scripts/Installers/Install-Rust.ps1
+++ b/images/win/scripts/Installers/Install-Rust.ps1
@@ -11,13 +11,10 @@ $env:CARGO_HOME="C:\Rust\.cargo"
# Download the latest rustup-init.exe for Windows x64
# See https://rustup.rs/#
-Invoke-WebRequest -UseBasicParsing -Uri "https://win.rustup.rs/x86_64" -OutFile rustup-init.exe
+$rustupPath = Start-DownloadWithRetry -Url "https://win.rustup.rs/x86_64" -Name "rustup-init.exe"
# Install Rust by running rustup-init.exe (disabling the confirmation prompt with -y)
-.\rustup-init.exe -y --default-toolchain=stable --profile=minimal
-
-# Delete rustup-init.exe when it's no longer needed
-Remove-Item -Path .\rustup-init.exe
+& $rustupPath -y --default-toolchain=stable --profile=minimal
# Add Rust binaries to the path
Add-MachinePathItem "$env:CARGO_HOME\bin"
diff --git a/images/win/scripts/Installers/Install-SQLPowerShellTools.ps1 b/images/win/scripts/Installers/Install-SQLPowerShellTools.ps1
index bf330f69..8369a994 100644
--- a/images/win/scripts/Installers/Install-SQLPowerShellTools.ps1
+++ b/images/win/scripts/Installers/Install-SQLPowerShellTools.ps1
@@ -5,57 +5,21 @@
Import-Module -Name ImageHelpers -Force
-Function InstallMSI
-{
- Param
- (
- [String]$MsiUrl,
- [String]$MsiName
- )
-
- $exitCode = -1
-
- try
- {
- Write-Host "Downloading $MsiName..."
- $FilePath = "${env:Temp}\$MsiName"
-
- Invoke-WebRequest -Uri $MsiUrl -OutFile $FilePath
-
- $Arguments = ('/i', $FilePath, '/QN', '/norestart' )
-
- Write-Host "Starting Install $MsiName..."
- $process = Start-Process -FilePath msiexec.exe -ArgumentList $Arguments -Wait -PassThru
- $exitCode = $process.ExitCode
-
- if ($exitCode -eq 0 -or $exitCode -eq 3010)
- {
- Write-Host -Object 'Installation successful'
- return $exitCode
- }
- else
- {
- Write-Host -Object "Non zero exit code returned by the installation process : $exitCode."
- exit $exitCode
- }
- }
- catch
- {
- Write-Host -Object "Failed to install the MSI $MsiName"
- Write-Host -Object $_.Exception.Message
- exit -1
- }
-}
+$BaseUrl = "https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x64"
# install required MSIs
-$SQLSysClrTypesExitCode = InstallMSI -MsiUrl "https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x64/SQLSysClrTypes.msi" -MsiName "SQLSysClrTypes.msi"
+$SQLSysClrTypesName = "SQLSysClrTypes.msi"
+$SQLSysClrTypesUrl = "${BaseUrl}/${SQLSysClrTypesName}"
+Install-Binary -Url $SQLSysClrTypesUrl -Name $SQLSysClrTypesName
-$SharedManagementObjectsExitCode = InstallMSI -MsiUrl "https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x64/SharedManagementObjects.msi" -MsiName "SharedManagementObjects.msi"
+$SharedManagementObjectsName = "SharedManagementObjects.msi"
+$SharedManagementObjectsUrl = "${BaseUrl}/${SharedManagementObjectsName}"
+Install-Binary -Url $SharedManagementObjectsUrl -Name $SharedManagementObjectsName
-$PowerShellToolsExitCode = InstallMSI -MsiUrl "https://download.microsoft.com/download/8/7/2/872BCECA-C849-4B40-8EBE-21D48CDF1456/ENU/x64/PowerShellTools.msi" -MsiName "PowerShellTools.msi"
+$PowerShellToolsName = "PowerShellTools.msi"
+$PowerShellToolsUrl = "${BaseUrl}/${PowerShellToolsName}"
+Install-Binary -Url $PowerShellToolsUrl -Name $PowerShellToolsName
# install sqlserver PS module
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
-Install-Module -Name SqlServer -AllowClobber
-
-exit $PowerShellToolsExitCode
+Install-Module -Name SqlServer -AllowClobber
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Update-AndroidSDK.ps1 b/images/win/scripts/Installers/Update-AndroidSDK.ps1
index 4a04b0b6..0e35c27a 100644
--- a/images/win/scripts/Installers/Update-AndroidSDK.ps1
+++ b/images/win/scripts/Installers/Update-AndroidSDK.ps1
@@ -5,10 +5,10 @@
# Download the latest command line tools so that we can accept all of the licenses.
# See https://developer.android.com/studio/#command-tools
-Invoke-WebRequest -UseBasicParsing -Uri "https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip" -OutFile android-sdk-tools.zip
+$sdkArchPath = Start-DownloadWithRetry -Url "https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip" -Name "android-sdk-tools.zip"
# Don't replace the one that VS installs as it seems to break things.
-Expand-Archive -Path android-sdk-tools.zip -DestinationPath android-sdk -Force
+Expand-Archive -Path $sdkArchPath -DestinationPath android-sdk -Force
$sdk = Get-Item -Path .\android-sdk
From 3fba9caa4f550544319c0201e7759f7a55f645cf Mon Sep 17 00:00:00 2001
From: Maksim Petrov <47208721+vmapetr@users.noreply.github.com>
Date: Tue, 5 May 2020 20:50:00 +0300
Subject: [PATCH 02/13] Improve Windows Visual Studio provisioners (#758)
* Add retries to DotnetSDK provisioner
* Improve VS provisioners
* Fixes in syntax
* Fixes in syntax
* Rename Install-VS function
* Remove bootstrapperName parameter from Install-VisualStudio
* Small fix
---
.../scripts/ImageHelpers/ImageHelpers.psm1 | 1 +
.../scripts/ImageHelpers/InstallHelpers.ps1 | 80 ++++++++++++++++--
.../scripts/Installers/Install-DotnetSDK.ps1 | 20 +++--
.../Installers/Windows2016/Install-VS2017.ps1 | 83 +++----------------
.../Installers/Windows2019/Install-VS2019.ps1 | 82 +++---------------
5 files changed, 111 insertions(+), 155 deletions(-)
diff --git a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 b/images/win/scripts/ImageHelpers/ImageHelpers.psm1
index 2b716880..94ff7b20 100644
--- a/images/win/scripts/ImageHelpers/ImageHelpers.psm1
+++ b/images/win/scripts/ImageHelpers/ImageHelpers.psm1
@@ -14,6 +14,7 @@ Export-ModuleMember -Function @(
'Get-SystemVariable'
'Set-SystemVariable'
'Install-Binary'
+ 'Install-VisualStudio'
'Get-ToolcachePackages'
'Get-ToolsetContent'
'Get-ToolsByName'
diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1
index c8d70c8b..8ec49e0d 100644
--- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1
+++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1
@@ -20,7 +20,8 @@ function Install-Binary
Install-Binary -Url "https://go.microsoft.com/fwlink/p/?linkid=2083338" -Name "winsdksetup.exe" -ArgumentList ("/features", "+", "/quiet")
#>
- Param (
+ Param
+ (
[Parameter(Mandatory)]
[String] $Url,
[Parameter(Mandatory)]
@@ -62,6 +63,68 @@ function Install-Binary
}
}
+Function Install-VisualStudio
+{
+ <#
+ .SYNOPSIS
+ A helper function to install Visual Studio.
+
+ .DESCRIPTION
+ Prepare system environment, and install Visual Studio bootstrapper with selected workloads.
+
+ .PARAMETER BootstrapperUrl
+ The URL from which the bootstrapper will be downloaded. Required parameter.
+
+ .PARAMETER WorkLoads
+ The string that contain workloads that will be passed to the installer.
+ #>
+
+ Param
+ (
+ [Parameter(Mandatory)]
+ [String] $BootstrapperUrl,
+ [String] $WorkLoads
+ )
+
+ Write-Host "Downloading Bootstrapper ..."
+ $BootstrapperName = [IO.Path]::GetFileName($BootstrapperUrl)
+ $bootstrapperFilePath = Start-DownloadWithRetry -Url $BootstrapperUrl -Name $BootstrapperName
+
+ try
+ {
+ Write-Host "Enable short name support on Windows needed for Xamarin Android AOT, defaults appear to have been changed in Azure VMs"
+ $shortNameEnableProcess = Start-Process -FilePath fsutil.exe -ArgumentList ('8dot3name', 'set', '0') -Wait -PassThru
+
+ $shortNameEnableExitCode = $shortNameEnableProcess.ExitCode
+ if ($shortNameEnableExitCode -ne 0)
+ {
+ Write-Host "Enabling short name support on Windows failed. This needs to be enabled prior to VS 2017 install for Xamarin Andriod AOT to work."
+ exit $shortNameEnableExitCode
+ }
+
+ Write-Host "Starting Install ..."
+ $bootstrapperArgumentList = ('/c', $bootstrapperFilePath, $WorkLoads, '--quiet', '--norestart', '--wait', '--nocache' )
+ $process = Start-Process -FilePath cmd.exe -ArgumentList $bootstrapperArgumentList -Wait -PassThru
+
+ $exitCode = $process.ExitCode
+ if ($exitCode -eq 0 -or $exitCode -eq 3010)
+ {
+ Write-Host "Installation successful"
+ return $exitCode
+ }
+ else
+ {
+ Write-Host "Non zero exit code returned by the installation process : $exitCode"
+ exit $exitCode
+ }
+ }
+ catch
+ {
+ Write-Host "Failed to install Visual Studio; $($_.Exception.Message)"
+ exit -1
+ }
+}
+
function Stop-SvcWithErrHandling
{
<#
@@ -74,7 +137,8 @@ function Stop-SvcWithErrHandling
.PARAMETER StopOnError
Switch for stopping the script and exit from PowerShell if one service is absent
#>
- param (
+ param
+ (
[Parameter(Mandatory, ValueFromPipeLine = $true)]
[string] $ServiceName,
[switch] $StopOnError
@@ -123,7 +187,8 @@ function Set-SvcWithErrHandling
Hashtable for service arguments
#>
- param (
+ param
+ (
[Parameter(Mandatory, ValueFromPipeLine = $true)]
[string] $ServiceName,
[Parameter(Mandatory)]
@@ -152,7 +217,8 @@ function Set-SvcWithErrHandling
function Start-DownloadWithRetry
{
- param (
+ param
+ (
[Parameter(Mandatory)]
[string] $Url,
[Parameter(Mandatory)]
@@ -253,7 +319,8 @@ function Install-VsixExtension
function Get-VSExtensionVersion
{
- param (
+ Param
+ (
[Parameter(Mandatory=$true)]
[string] $packageName
)
@@ -289,7 +356,8 @@ function Get-ToolsetContent {
}
function Get-ToolsByName {
- param (
+ Param
+ (
[Parameter(Mandatory = $True)]
[string]$SoftwareName
)
diff --git a/images/win/scripts/Installers/Install-DotnetSDK.ps1 b/images/win/scripts/Installers/Install-DotnetSDK.ps1
index 57d7668c..7668e7c2 100644
--- a/images/win/scripts/Installers/Install-DotnetSDK.ps1
+++ b/images/win/scripts/Installers/Install-DotnetSDK.ps1
@@ -32,7 +32,10 @@ function InstallSDKVersion (
}
# Fix for issue 1276. This will be fixed in 3.1.
- Invoke-WebRequest -Uri "https://raw.githubusercontent.com/dotnet/sdk/82bc30c99f1325dfaa7ad450be96857a4fca2845/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.ImportPublishProfile.targets" -outfile "C:\Program Files\dotnet\sdk\$sdkVersion\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportPublishProfile.targets"
+ $sdkTargetsName = "Microsoft.NET.Sdk.ImportPublishProfile.targets"
+ $sdkTargetsUrl = "https://raw.githubusercontent.com/dotnet/sdk/82bc30c99f1325dfaa7ad450be96857a4fca2845/src/Tasks/Microsoft.NET.Build.Tasks/targets/${sdkTargetsName}"
+ $sdkTargetsPath = "C:\Program Files\dotnet\sdk\$sdkVersion\Sdks\Microsoft.NET.Sdk\targets"
+ Start-DownloadWithRetry -Url $sdkTargetsUrl -DownloadPath $sdkTargetsPath -Name $sdkTargetsName
# warm up dotnet for first time experience
$templates | ForEach-Object {
@@ -49,8 +52,10 @@ function InstallSDKVersion (
function InstallAllValidSdks()
{
- Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json' -UseBasicParsing -OutFile 'releases-index.json'
- $dotnetChannels = Get-Content -Path 'releases-index.json' | ConvertFrom-Json
+ $releaseIndexName = "releases-index.json"
+ $releaseIndexUrl = "https://raw.githubusercontent.com/dotnet/core/master/release-notes/${releaseIndexName}"
+ $releasesIndexPath = Start-DownloadWithRetry -Url $releaseIndexUrl -Name $releaseIndexName
+ $dotnetChannels = Get-Content -Path $releasesIndexPath | ConvertFrom-Json
# Consider all channels except preview/eol channels.
# Sort the channels in ascending order
@@ -58,13 +63,15 @@ function InstallAllValidSdks()
$dotnetChannels = $dotnetChannels.'releases-index' | Where-Object { (!$_."support-phase".Equals('preview') -and !$_."support-phase".Equals('eol')) -or ($_."channel-version" -eq "2.2") } | Sort-Object { [Version] $_."channel-version" }
# Download installation script.
- Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1' -UseBasicParsing -OutFile 'dotnet-install.ps1'
+ $installationName = "dotnet-install.ps1"
+ $installationUrl = "https://dot.net/v1/${installationName}"
+ Start-DownloadWithRetry -Url $installationUrl -Name $installationName -DownloadPath ".\"
ForEach ($dotnetChannel in $dotnetChannels)
{
$channelVersion = $dotnetChannel.'channel-version';
- Invoke-WebRequest -Uri $dotnetChannel.'releases.json' -UseBasicParsing -OutFile "releases-$channelVersion.json"
- $currentReleases = Get-Content -Path "releases-$channelVersion.json" | ConvertFrom-Json
+ $releasesJsonPath = Start-DownloadWithRetry -Url $dotnetChannel.'releases.json' -Name "releases-$channelVersion.json"
+ $currentReleases = Get-Content -Path $releasesJsonPath | ConvertFrom-Json
# filtering out the preview/rc releases
$currentReleases = $currentReleases.'releases' | Where-Object { !$_.'release-version'.Contains('-') } | Sort-Object { [Version] $_.'release-version' }
@@ -74,7 +81,6 @@ function InstallAllValidSdks()
{
Write-Host 'Found sdks property in release: ' + $release.'release-version' + 'with sdks count: ' + $release.'sdks'.Count
-
# Remove duplicate entries & preview/rc version from download list
# Sort the sdks on version
$sdks = @($release.'sdk');
diff --git a/images/win/scripts/Installers/Windows2016/Install-VS2017.ps1 b/images/win/scripts/Installers/Windows2016/Install-VS2017.ps1
index 9edcb14f..45fae7cd 100644
--- a/images/win/scripts/Installers/Windows2016/Install-VS2017.ps1
+++ b/images/win/scripts/Installers/Windows2016/Install-VS2017.ps1
@@ -3,63 +3,11 @@
## Desc: Install Visual Studio 2017
################################################################################
-Function InstallVS
-{
- Param
- (
- [String]$WorkLoads,
- [String]$Sku,
- [String] $VSBootstrapperURL
- )
+$ErrorActionPreference = "Stop"
- $exitCode = -1
+Import-Module -Name ImageHelpers -Force
- try
- {
- Write-Host "Enable short name support on Windows needed for Xamarin Android AOT, defaults appear to have been changed in Azure VMs"
- $shortNameEnableProcess = Start-Process -FilePath fsutil.exe -ArgumentList ('8dot3name', 'set', '0') -Wait -PassThru
- $shortNameEnableExitCode = $shortNameEnableProcess.ExitCode
-
- if ($shortNameEnableExitCode -ne 0)
- {
- Write-Host -Object 'Enabling short name support on Windows failed. This needs to be enabled prior to VS 2017 install for Xamarin Andriod AOT to work.'
- exit $shortNameEnableExitCode
- }
-
- Write-Host "Downloading Bootstrapper ..."
- Invoke-WebRequest -Uri $VSBootstrapperURL -OutFile "${env:Temp}\vs_$Sku.exe"
-
- $FilePath = "${env:Temp}\vs_$Sku.exe"
- $Arguments = ('/c', $FilePath, $WorkLoads, '--quiet', '--norestart', '--wait', '--nocache' )
-
- Write-Host "Starting Install ..."
- $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru
- $exitCode = $process.ExitCode
-
- if ($exitCode -eq 0 -or $exitCode -eq 3010)
- {
- Write-Host -Object 'Installation successful'
- return $exitCode
- }
- else
- {
- Write-Host -Object "Non zero exit code returned by the installation process : $exitCode."
-
- # this wont work because of log size limitation in extension manager
- # Get-Content $customLogFilePath | Write-Host
-
- exit $exitCode
- }
- }
- catch
- {
- Write-Host -Object "Failed to install Visual Studio. Check the logs for details in $customLogFilePath"
- Write-Host -Object $_.Exception.Message
- exit -1
- }
-}
-
-$WorkLoads = '--allWorkloads --includeRecommended ' + `
+$WorkLoads = '--allWorkloads --includeRecommended ' + `
'--add Microsoft.Net.Component.4.6.2.SDK ' + `
'--add Microsoft.Net.Component.4.6.2.TargetingPack ' + `
'--add Microsoft.Net.ComponentGroup.4.6.2.DeveloperTools ' + `
@@ -129,20 +77,18 @@ $WorkLoads = '--allWorkloads --includeRecommended ' + `
'--add Microsoft.VisualStudio.Workload.Office ' + `
'--add Microsoft.VisualStudio.Workload.OfficeBuildTools '
-$Sku = 'Enterprise'
-$VSBootstrapperURL = 'https://aka.ms/vs/15/release/vs_enterprise.exe'
-
-$ErrorActionPreference = 'Stop'
+$ReleaseInPath = "Enterprise"
+$BootstrapperUrl = "https://aka.ms/vs/15/release/vs_${ReleaseInPath}.exe"
# Install VS
-$exitCode = InstallVS -WorkLoads $WorkLoads -Sku $Sku -VSBootstrapperURL $VSBootstrapperURL
+Install-VisualStudio -BootstrapperUrl $BootstrapperUrl -WorkLoads $WorkLoads
# Find the version of VS installed for this instance
# Only supports a single instance
$vsProgramData = Get-Item -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
$instanceFolders = Get-ChildItem -Path $vsProgramData.FullName
-if($instanceFolders -is [array])
+if ($instanceFolders -is [array])
{
Write-Host "More than one instance installed"
exit 1
@@ -151,20 +97,19 @@ if($instanceFolders -is [array])
$catalogContent = Get-Content -Path ($instanceFolders.FullName + '\catalog.json')
$catalog = $catalogContent | ConvertFrom-Json
$version = $catalog.info.id
-$VSInstallRoot = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise"
-Write-Host "Visual Studio version" $version "installed"
+$VSInstallRoot = "C:\Program Files (x86)\Microsoft Visual Studio\2017\$ReleaseInPath"
+Write-Host "Visual Studio version ${version} installed"
# Initialize Visual Studio Experimental Instance for integration testing
-&"$VSInstallRoot\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit | Wait-Process
+& "$VSInstallRoot\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit | Wait-Process
# Updating content of MachineState.json file to disable autoupdate of VSIX extensions
$newContent = '{"Extensions":[{"Key":"1e906ff5-9da8-4091-a299-5c253c55fdc9","Value":{"ShouldAutoUpdate":false}},{"Key":"Microsoft.VisualStudio.Web.AzureFunctions","Value":{"ShouldAutoUpdate":false}}],"ShouldAutoUpdate":false,"ShouldCheckForUpdates":false}'
Set-Content -Path "$VSInstallRoot\Common7\IDE\Extensions\MachineState.json" -Value $newContent
-
# Adding description of the software to Markdown
-$SoftwareName = "Visual Studio 2017 Enterprise"
+$SoftwareName = "Visual Studio 2017 $ReleaseInPath"
$Description = @"
_Version:_ $version
@@ -198,8 +143,4 @@ In addition the following optional components are installed:
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
# Adding explicitly added Workloads details to markdown by parsing $Workloads
-Add-ContentToMarkdown -Content $($WorkLoads.Split('--') | % { if( ($_.Split(" "))[0] -like "add") { "* " +($_.Split(" "))[1] } } )
-
-
-
-exit $exitCode
+Add-ContentToMarkdown -Content $($WorkLoads.Split('--') | % { if( ($_.Split(" "))[0] -like "add") { "* " +($_.Split(" "))[1] } } )
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1 b/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1
index 1ccd5c42..627ff18d 100644
--- a/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1
+++ b/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1
@@ -4,61 +4,7 @@
################################################################################
$ErrorActionPreference = "Stop"
-Function InstallVS
-{
- Param
- (
- [String]$WorkLoads,
- [String]$Sku,
- [String] $VSBootstrapperURL
- )
-
- $exitCode = -1
-
- try
- {
- Write-Host "Enable short name support on Windows needed for Xamarin Android AOT, defaults appear to have been changed in Azure VMs"
- $shortNameEnableProcess = Start-Process -FilePath fsutil.exe -ArgumentList ('8dot3name', 'set', '0') -Wait -PassThru
- $shortNameEnableExitCode = $shortNameEnableProcess.ExitCode
-
- if ($shortNameEnableExitCode -ne 0)
- {
- Write-Host -Object 'Enabling short name support on Windows failed. This needs to be enabled prior to VS 2017 install for Xamarin Andriod AOT to work.'
- exit $shortNameEnableExitCode
- }
-
- Write-Host "Downloading Bootstrapper ..."
- Invoke-WebRequest -Uri $VSBootstrapperURL -OutFile "${env:Temp}\vs_$Sku.exe"
-
- $FilePath = "${env:Temp}\vs_$Sku.exe"
- $Arguments = ('/c', $FilePath, $WorkLoads, '--quiet', '--norestart', '--wait', '--nocache' )
-
- Write-Host "Starting Install ..."
- $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru
- $exitCode = $process.ExitCode
-
- if ($exitCode -eq 0 -or $exitCode -eq 3010)
- {
- Write-Host -Object 'Installation successful'
- return $exitCode
- }
- else
- {
- Write-Host -Object "Non zero exit code returned by the installation process : $exitCode."
-
- # this wont work because of log size limitation in extension manager
- # Get-Content $customLogFilePath | Write-Host
-
- exit $exitCode
- }
- }
- catch
- {
- Write-Host -Object "Failed to install Visual Studio. Check the logs for details in $customLogFilePath"
- Write-Host -Object $_.Exception.Message
- exit -1
- }
-}
+Import-Module -Name ImageHelpers -Force
$WorkLoads = '--allWorkloads --includeRecommended ' + `
'--add Component.Dotfuscator ' + `
@@ -150,22 +96,18 @@ $WorkLoads = '--allWorkloads --includeRecommended ' + `
'--add Microsoft.VisualStudio.Workload.Universal ' + `
'--add Microsoft.VisualStudio.Workload.VisualStudioExtension'
-
-$ReleaseInPath = 'Enterprise'
-$Sku = 'Enterprise'
-$VSBootstrapperURL = 'https://aka.ms/vs/16/release/vs_Enterprise.exe'
-
-$ErrorActionPreference = 'Stop'
+$ReleaseInPath = "Enterprise"
+$BootstrapperUrl = "https://aka.ms/vs/16/release/vs_${ReleaseInPath}.exe"
# Install VS
-$exitCode = InstallVS -WorkLoads $WorkLoads -Sku $Sku -VSBootstrapperURL $VSBootstrapperURL
+Install-VisualStudio -BootstrapperUrl $BootstrapperUrl -WorkLoads $WorkLoads
# Find the version of VS installed for this instance
# Only supports a single instance
$vsProgramData = Get-Item -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
$instanceFolders = Get-ChildItem -Path $vsProgramData.FullName
-if($instanceFolders -is [array])
+if ($instanceFolders -is [array])
{
Write-Host "More than one instance installed"
exit 1
@@ -174,14 +116,15 @@ if($instanceFolders -is [array])
$catalogContent = Get-Content -Path ($instanceFolders.FullName + '\catalog.json')
$catalog = $catalogContent | ConvertFrom-Json
$version = $catalog.info.id
-Write-Host "Visual Studio version" $version "installed"
+$VSInstallRoot = "C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath"
+Write-Host "Visual Studio version ${version} installed"
# Initialize Visual Studio Experimental Instance
-&"C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit
+& "$VSInstallRoot\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit
# Updating content of MachineState.json file to disable autoupdate of VSIX extensions
$newContent = '{"Extensions":[{"Key":"1e906ff5-9da8-4091-a299-5c253c55fdc9","Value":{"ShouldAutoUpdate":false}},{"Key":"Microsoft.VisualStudio.Web.AzureFunctions","Value":{"ShouldAutoUpdate":false}}],"ShouldAutoUpdate":false,"ShouldCheckForUpdates":false}'
-Set-Content -Path "C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath\Common7\IDE\Extensions\MachineState.json" -Value $newContent
+Set-Content -Path "$VSInstallRoot\Common7\IDE\Extensions\MachineState.json" -Value $newContent
# Adding description of the software to Markdown
@@ -190,7 +133,7 @@ $SoftwareName = "Visual Studio 2019 Enterprise"
$Description = @"
_Version:_ $version
-_Location:_ C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath
+_Location:_ $VSInstallRoot
The following workloads and components are installed with Visual Studio 2019:
"@
@@ -198,7 +141,4 @@ The following workloads and components are installed with Visual Studio 2019:
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
# Adding explicitly added Workloads details to markdown by parsing $Workloads
-Add-ContentToMarkdown -Content $($WorkLoads.Split('--') | % { if( ($_.Split(" "))[0] -like "add") { "* " +($_.Split(" "))[1] } } )
-
-
-exit $exitCode
+Add-ContentToMarkdown -Content $($WorkLoads.Split('--') | % { if( ($_.Split(" "))[0] -like "add") { "* " +($_.Split(" "))[1] } } )
\ No newline at end of file
From 3f36d8ef3571515765992f79cef2cafb82501f16 Mon Sep 17 00:00:00 2001
From: Maksim Petrov <47208721+vmapetr@users.noreply.github.com>
Date: Wed, 6 May 2020 07:19:15 +0300
Subject: [PATCH 03/13] Improve Windows browsers provisioners stability (#725)
* Improve Chrome provisioner
* Improve Edge provisioner
* Improve Firefox provisioner
* Resolve conflicts in Install-Chrome.ps1
---
.../win/scripts/Installers/Install-Chrome.ps1 | 91 +++++++++----------
.../win/scripts/Installers/Install-Edge.ps1 | 43 +++++----
.../scripts/Installers/Install-Firefox.ps1 | 87 +++++++-----------
3 files changed, 96 insertions(+), 125 deletions(-)
diff --git a/images/win/scripts/Installers/Install-Chrome.ps1 b/images/win/scripts/Installers/Install-Chrome.ps1
index c94641f1..22b477b2 100644
--- a/images/win/scripts/Installers/Install-Chrome.ps1
+++ b/images/win/scripts/Installers/Install-Chrome.ps1
@@ -3,23 +3,25 @@
## Desc: Install Google Chrome
################################################################################
-Import-Module -Name ImageHelpers -Force;
+Import-Module -Name ImageHelpers -Force
-$ChromeInstallerFile = "chrome_installer.exe";
-$ChromeInstallerUrl = "https://dl.google.com/chrome/install/375.126/${ChromeInstallerFile}";
+# Download and install latest Chrome browser
+$ChromeInstallerFile = "chrome_installer.exe"
+$ChromeInstallerUrl = "https://dl.google.com/chrome/install/375.126/${ChromeInstallerFile}"
Install-Binary -Url $ChromeInstallerUrl -Name $ChromeInstallerFile -ArgumentList ("/silent", "/install")
-Write-Host "Adding the firewall rule for Google update blocking";
-New-NetFirewallRule -DisplayName "BlockGoogleUpdate" -Direction Outbound -Action Block -Program "C:\Program Files (x86)\Google\Update\GoogleUpdate.exe";
+# Prepare firewall rules
+Write-Host "Adding the firewall rule for Google update blocking..."
+New-NetFirewallRule -DisplayName "BlockGoogleUpdate" -Direction Outbound -Action Block -Program "C:\Program Files (x86)\Google\Update\GoogleUpdate.exe"
-$GoogleSvcs = ('gupdate','gupdatem');
-$GoogleSvcs | Stop-SvcWithErrHandling -StopOnError;
-$GoogleSvcs | Set-SvcWithErrHandling -Arguments @{StartupType = "Disabled"};
+$GoogleSvcs = ('gupdate','gupdatem')
+$GoogleSvcs | Stop-SvcWithErrHandling -StopOnError
+$GoogleSvcs | Set-SvcWithErrHandling -Arguments @{StartupType = "Disabled"}
-$regGoogleUpdatePath = "HKLM:\SOFTWARE\Policies\Google\Update";
-$regGoogleUpdateChrome = "HKLM:\SOFTWARE\Policies\Google\Chrome";
+$regGoogleUpdatePath = "HKLM:\SOFTWARE\Policies\Google\Update"
+$regGoogleUpdateChrome = "HKLM:\SOFTWARE\Policies\Google\Chrome"
($regGoogleUpdatePath, $regGoogleUpdateChrome) | ForEach-Object {
- New-Item -Path $_ -Force;
+ New-Item -Path $_ -Force
}
$regGoogleParameters = @(
@@ -31,52 +33,45 @@ $regGoogleParameters = @(
)
$regGoogleParameters | ForEach-Object {
- $Arguments = $_;
- if (-not ($Arguments.Path)) {
- $Arguments.Add("Path", $regGoogleUpdatePath);
+ $Arguments = $_
+ if (-not ($Arguments.Path))
+ {
+ $Arguments.Add("Path", $regGoogleUpdatePath)
}
- $Arguments.Add("Force", $true);
- New-ItemProperty @Arguments;
+ $Arguments.Add("Force", $true)
+ New-ItemProperty @Arguments
}
-# Reinstall Chrome Web Driver
-Write-Host "Install Chrome WebDriver"
-$DestinationPath = "$($env:SystemDrive)\";
-$ChromeDriverPath = "${DestinationPath}SeleniumWebDrivers\ChromeDriver";
-
-if (-not (Test-Path -Path $ChromeDriverPath)) {
- New-Item -Path $ChromeDriverPath -ItemType "directory"
+# Install Chrome WebDriver
+Write-Host "Install Chrome WebDriver..."
+$ChromeDriverPath = "$($env:SystemDrive)\SeleniumWebDrivers\ChromeDriver"
+if (-not (Test-Path -Path $ChromeDriverPath))
+{
+ New-Item -Path $ChromeDriverPath -ItemType Directory -Force
}
+Write-Host "Get the Chrome WebDriver version..."
$RegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"
-$ChromePath = (Get-ItemProperty "$RegistryPath\chrome.exe").'(default)';
-[version]$ChromeVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($ChromePath).ProductVersion;
-Write-Host "Chrome version: [$ChromeVersion]";
+$ChromePath = (Get-ItemProperty "$RegistryPath\chrome.exe").'(default)'
+[version]$ChromeVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($ChromePath).ProductVersion
+$ChromeDriverVersionUrl = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$($ChromeVersion.Major).$($ChromeVersion.Minor).$($ChromeVersion.Build)"
-$ChromeDriverVersionUri = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$($ChromeVersion.Major).$($ChromeVersion.Minor).$($ChromeVersion.Build)";
-Write-Host "Chrome driver version Uri [$ChromeDriverVersionUri]";
-Write-Host "Getting the Chrome driver version...";
-$ChromeDriverVersion = Invoke-WebRequest -Uri $ChromeDriverVersionUri;
-Write-Host "Current Chrome driver version: [$ChromeDriverVersion]";
+$ChromeDriverVersionFile = Start-DownloadWithRetry -Url $ChromeDriverVersionUrl -Name "versioninfo.txt" -DownloadPath $ChromeDriverPath
-$ChromeDriverZipDownloadUri = "https://chromedriver.storage.googleapis.com/$($ChromeDriverVersion.ToString())/chromedriver_win32.zip";
-Write-Host "Chrome driver zip file download Uri: [$ChromeDriverZipDownloadUri]";
+Write-Host "Download Chrome WebDriver..."
+$ChromeDriverVersion = Get-Content -Path $ChromeDriverVersionFile
+$ChromeDriverArchName = "chromedriver_win32.zip"
+$ChromeDriverZipDownloadUrl = "https://chromedriver.storage.googleapis.com/${ChromeDriverVersion}/${ChromeDriverArchName}"
-$DestFile= "$ChromeDriverPath\chromedriver_win32.zip";
-$ChromeDriverVersion.Content | Out-File -FilePath "$ChromeDriverPath\versioninfo.txt" -Force;
+$ChromeDriverArchPath = Start-DownloadWithRetry -Url $ChromeDriverZipDownloadUrl -Name $ChromeDriverArchName
-Write-Host "Chrome driver download....";
-Invoke-WebRequest -Uri $ChromeDriverZipDownloadUri -OutFile $DestFile;
+Write-Host "Expand Chrome WebDriver archive..."
+Expand-Archive -Path $ChromeDriverArchPath -DestinationPath $ChromeDriverPath -Force
-Write-Host "Chrome driver install....";
-Expand-Archive -Path "$ChromeDriverPath\chromedriver_win32.zip" -DestinationPath $ChromeDriverPath -Force;
-Remove-Item -Path "$ChromeDriverPath\chromedriver_win32.zip" -Force;
+Write-Host "Setting the environment variables..."
+setx ChromeWebDriver "$ChromeDriverPath" /M
-Write-Host "Setting the environment variables"
-
-setx ChromeWebDriver "$ChromeDriverPath" /M;
-
-$regEnvKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\';
-$PathValue = Get-ItemPropertyValue -Path $regEnvKey -Name 'Path';
-$PathValue += ";$ChromeDriverPath\";
-Set-ItemProperty -Path $regEnvKey -Name 'Path' -Value $PathValue;
+$regEnvKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\'
+$PathValue = Get-ItemPropertyValue -Path $regEnvKey -Name 'Path'
+$PathValue += ";$ChromeDriverPath\"
+Set-ItemProperty -Path $regEnvKey -Name 'Path' -Value $PathValue
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Install-Edge.ps1 b/images/win/scripts/Installers/Install-Edge.ps1
index 430e8bbb..c10f2422 100644
--- a/images/win/scripts/Installers/Install-Edge.ps1
+++ b/images/win/scripts/Installers/Install-Edge.ps1
@@ -5,37 +5,36 @@
Choco-Install -PackageName microsoft-edge
-# Install Microsoft Edge Web Driver
-Write-Host "Install Edge WebDriver"
-$DestinationPath = "$($env:SystemDrive)\";
-
-$EdgeDriverPath = "${DestinationPath}SeleniumWebDrivers\EdgeDriver"
-if (-not (Test-Path -Path $EdgeDriverPath)) {
- New-Item -Path $EdgeDriverPath -ItemType "directory"
+# Install Microsoft Edge WebDriver
+Write-Host "Install Edge WebDriver..."
+$EdgeDriverPath = "$($env:SystemDrive)\SeleniumWebDrivers\EdgeDriver"
+if (-not (Test-Path -Path $EdgeDriverPath))
+{
+ New-Item -Path $EdgeDriverPath -ItemType Directory -Force
}
+Write-Host "Get the Microsoft Edge WebDriver version..."
$RegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"
$EdgePath = (Get-ItemProperty "$RegistryPath\msedge.exe").'(default)'
[version]$EdgeVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($EdgePath).ProductVersion
$EdgeDriverVersionUrl = "https://msedgedriver.azureedge.net/LATEST_RELEASE_$($EdgeVersion.Major)"
-$EdgeDriverVersionFile = "$EdgeDriverPath\versioninfo.txt"
-Invoke-WebRequest -Uri $EdgeDriverVersionUrl -OutFile $EdgeDriverVersionFile
-Write-Host "Microsoft Edge driver download started"
+$EdgeDriverVersionFile = Start-DownloadWithRetry -Url $EdgeDriverVersionUrl -Name "versioninfo.txt" -DownloadPath $EdgeDriverPath
+
+Write-Host "Download Microsoft Edge WebDriver..."
$EdgeDriverLatestVersion = Get-Content -Path $EdgeDriverVersionFile
-$EdgeDriverDownloadUrl="https://msedgedriver.azureedge.net/${EdgeDriverLatestVersion}/edgedriver_win64.zip"
-$DestFile = "$EdgeDriverPath\edgedriver_win64.zip"
-Invoke-WebRequest -Uri $EdgeDriverDownloadUrl -OutFile $DestFile
+$EdgeDriverArchName = "edgedriver_win64.zip"
+$EdgeDriverDownloadUrl="https://msedgedriver.azureedge.net/${EdgeDriverLatestVersion}/${EdgeDriverArchName}"
-Write-Host "Microsoft Edge driver installation started"
-Expand-Archive -Path $DestFile -DestinationPath $EdgeDriverPath -Force
-Remove-Item -Path $DestFile -Force
+$EdgeDriverArchPath = Start-DownloadWithRetry -Url $EdgeDriverDownloadUrl -Name $EdgeDriverArchName
-Write-Host "Setting the environment variables"
+Write-Host "Expand Microsoft Edge WebDriver archive..."
+Expand-Archive -Path $EdgeDriverArchPath -DestinationPath $EdgeDriverPath -Force
-setx EdgeWebDriver "$EdgeDriverPath" /M;
+Write-Host "Setting the environment variables..."
+setx EdgeWebDriver "$EdgeDriverPath" /M
-$regEnvKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\';
-$PathValue = Get-ItemPropertyValue -Path $regEnvKey -Name 'Path';
-$PathValue += ";$EdgeDriverPath\";
-Set-ItemProperty -Path $regEnvKey -Name 'Path' -Value $PathValue;
+$regEnvKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\'
+$PathValue = Get-ItemPropertyValue -Path $regEnvKey -Name 'Path'
+$PathValue += ";$EdgeDriverPath\"
+Set-ItemProperty -Path $regEnvKey -Name 'Path' -Value $PathValue
\ No newline at end of file
diff --git a/images/win/scripts/Installers/Install-Firefox.ps1 b/images/win/scripts/Installers/Install-Firefox.ps1
index 2f919baa..efd3fe8b 100644
--- a/images/win/scripts/Installers/Install-Firefox.ps1
+++ b/images/win/scripts/Installers/Install-Firefox.ps1
@@ -5,71 +5,48 @@
Import-Module -Name ImageHelpers -Force
-$temp_install_dir = 'C:\Windows\Installer'
-New-Item -Path $temp_install_dir -ItemType Directory -Force
+# Install and configure Firefox browser
+Write-Host "Install latest Firefox browser..."
+$VersionsManifest = Invoke-RestMethod "https://product-details.mozilla.org/1.0/firefox_versions.json"
+$InstallerName = "firefox-browser.exe"
+$InstallerUrl = "https://download.mozilla.org/?product=firefox-$($VersionsManifest.LATEST_FIREFOX_VERSION)&os=win64&lang=en-US"
+$ArgumentList = ("/silent", "/install")
-$versionsJson = Invoke-RestMethod "https://product-details.mozilla.org/1.0/firefox_versions.json"
-$latestVersion = $versionsJson.LATEST_FIREFOX_VERSION
-Write-Host "Firefox latest version: $latestVersion"
+Install-Binary -Url $InstallerUrl -Name $InstallerName -ArgumentList $ArgumentList
-# url for latest version of firefox
-$urlLatestVersion = "https://download.mozilla.org/?product=firefox-${latestVersion}&os=win64&lang=en-US"
-Install-Binary -Url $urlLatestVersion -Name "Firefox Setup $latestVersion.exe" -ArgumentList ("/silent", "/install")
-
-# Disable autoupdate
-$firefoxDirectoryPath = Join-Path $env:ProgramFiles "Mozilla Firefox"
-New-Item -path $firefoxDirectoryPath -Name 'mozilla.cfg' -Value '//
+Write-Host "Disable autoupdate..."
+$FirefoxDirectoryPath = Join-Path $env:ProgramFiles "Mozilla Firefox"
+New-Item -path $FirefoxDirectoryPath -Name 'mozilla.cfg' -Value '//
pref("browser.shell.checkDefaultBrowser", false);
pref("app.update.enabled", false);' -ItemType file -force
-$firefoxPreferencesFolder = Join-Path $firefoxDirectoryPath "defaults\pref"
-New-Item -path $firefoxPreferencesFolder -Name 'local-settings.js' -Value 'pref("general.config.obscure_value", 0);
+$FirefoxPreferencesFolder = Join-Path $FirefoxDirectoryPath "defaults\pref"
+New-Item -path $FirefoxPreferencesFolder -Name 'local-settings.js' -Value 'pref("general.config.obscure_value", 0);
pref("general.config.filename", "mozilla.cfg");' -ItemType file -force
-# Install Firefox gecko Web Driver
-Write-Host "Install Firefox WebDriver"
-$DestinationPath = "$($env:SystemDrive)\";
-$SeleniumWebDriverPath = Join-Path $DestinationPath "SeleniumWebDrivers"
-
-$geckodriverJson = Invoke-RestMethod "https://api.github.com/repos/mozilla/geckodriver/releases/latest"
-$geckodriverWindowsAsset = $geckodriverJson.assets | Where-Object { $_.name -Match "win64" } | Select-Object -First 1
-
-$geckodriverVersion = $geckodriverJson.tag_name
-Write-Host "Geckodriver version: $geckodriverVersion"
-
-$DriversZipFile = $geckodriverWindowsAsset.name
-Write-Host "Selenium drivers download and install..."
-
-$FirefoxDriverPath = Join-Path $SeleniumWebDriverPath "GeckoDriver"
-
-if (-not (Test-Path -Path $FirefoxDriverPath)) {
- New-Item -Path $FirefoxDriverPath -ItemType "directory"
+# Download and install Gecko WebDriver
+Write-Host "Install Gecko WebDriver..."
+$GeckoDriverPath = "$($env:SystemDrive)\SeleniumWebDrivers\GeckoDriver"
+if (-not (Test-Path -Path $GeckoDriverPath))
+{
+ New-Item -Path $GeckoDriverPath -ItemType Directory -Force
}
-$geckodriverVersion.Substring(1) | Out-File -FilePath "$FirefoxDriverPath\versioninfo.txt" -Force;
+Write-Host "Get the Gecko WebDriver version..."
+$GeckoDriverJson = Invoke-RestMethod "https://api.github.com/repos/mozilla/geckodriver/releases/latest"
+$GeckoDriverWindowsAsset = $GeckoDriverJson.assets | Where-Object { $_.name -Match "win64" } | Select-Object -First 1
+$GeckoDriverVersion = $GeckoDriverJson.tag_name
+$GeckoDriverVersion.Substring(1) | Out-File -FilePath "$GeckoDriverPath\versioninfo.txt" -Force;
-# Install Firefox Web Driver
-Write-Host "FireFox driver download...."
-if (-not (Test-Path -Path $FireFoxDriverPath)) {
- New-Item -Path $FireFoxDriverPath -ItemType "directory"
-}
+Write-Host "Download Gecko WebDriver WebDriver..."
+$GeckoDriverArchName = $GeckoDriverWindowsAsset.name
+$GeckoDriverDownloadUrl = $GeckoDriverWindowsAsset.browser_download_url
-$DestFile = Join-Path $FireFoxDriverPath $DriversZipFile
-$FireFoxDriverDownloadUrl = $geckodriverWindowsAsset.browser_download_url
-try{
- Invoke-WebRequest -Uri $FireFoxDriverDownloadUrl -OutFile $DestFile
-} catch {
- Write-Error "[!] Failed to download $DriversZipFile"
- exit 1
-}
+$GeckoDriverArchPath = Start-DownloadWithRetry -Url $GeckoDriverDownloadUrl -Name $GeckoDriverArchName
-Write-Host "FireFox driver install...."
-Expand-Archive -Path $DestFile -DestinationPath $FireFoxDriverPath -Force
-Remove-Item -Path $DestFile -Force
+Write-Host "Expand Gecko WebDriver archive..."
+Expand-Archive -Path $GeckoDriverArchPath -DestinationPath $GeckoDriverPath -Force
-
-Write-Host "Setting the environment variables"
-Add-MachinePathItem -PathItem $FireFoxDriverPath
-setx GeckoWebDriver "$FirefoxDriverPath" /M;
-
-exit 0
+Write-Host "Setting the environment variables..."
+Add-MachinePathItem -PathItem $GeckoDriverPath
+setx GeckoWebDriver "$GeckoDriverPath" /M
\ No newline at end of file
From c6f9a9a38af1884acccd0a4eb00c850fdbb97f8b Mon Sep 17 00:00:00 2001
From: Vladimir Safonkin
Date: Wed, 6 May 2020 07:20:11 +0300
Subject: [PATCH 04/13] Add retry logic for javatools (#802)
* Add retry logic for javatools
---
.../scripts/Installers/Install-JavaTools.ps1 | 50 ++++++-------------
1 file changed, 16 insertions(+), 34 deletions(-)
diff --git a/images/win/scripts/Installers/Install-JavaTools.ps1 b/images/win/scripts/Installers/Install-JavaTools.ps1
index 96282371..8ab75910 100644
--- a/images/win/scripts/Installers/Install-JavaTools.ps1
+++ b/images/win/scripts/Installers/Install-JavaTools.ps1
@@ -3,33 +3,22 @@
## Desc: Install various JDKs and java tools
################################################################################
+Import-Module -Name ImageHelpers -Force
+
# Download the Azul Systems Zulu JDKs
# See https://www.azul.com/downloads/azure-only/zulu/
-$azulJDK7Uri = 'https://repos.azul.com/azure-only/zulu/packages/zulu-7/7u232/zulu-7-azure-jdk_7.31.0.5-7.0.232-win_x64.zip'
-$azulJDK8Uri = 'https://repos.azul.com/azure-only/zulu/packages/zulu-8/8u222/zulu-8-azure-jdk_8.40.0.25-8.0.222-win_x64.zip'
-$azulJDK11Uri = 'https://repos.azul.com/azure-only/zulu/packages/zulu-11/11.0.4/zulu-11-azure-jdk_11.33.15-11.0.4-win_x64.zip'
-$azulJDK13Uri = 'https://repos.azul.com/azure-only/zulu/packages/zulu-13/13.0.3/zulu-13-azure-jdk_13.31.11-13.0.3-win_x64.zip'
+$azulJDKURLs = @(
+ 'https://repos.azul.com/azure-only/zulu/packages/zulu-7/7u232/zulu-7-azure-jdk_7.31.0.5-7.0.232-win_x64.zip',
+ 'https://repos.azul.com/azure-only/zulu/packages/zulu-8/8u222/zulu-8-azure-jdk_8.40.0.25-8.0.222-win_x64.zip',
+ 'https://repos.azul.com/azure-only/zulu/packages/zulu-11/11.0.4/zulu-11-azure-jdk_11.33.15-11.0.4-win_x64.zip',
+ 'https://repos.azul.com/azure-only/zulu/packages/zulu-13/13.0.3/zulu-13-azure-jdk_13.31.11-13.0.3-win_x64.zip'
+)
-cd $env:TEMP
-
-Invoke-WebRequest -UseBasicParsing -Uri $azulJDK7Uri -OutFile azulJDK7.zip
-Invoke-WebRequest -UseBasicParsing -Uri $azulJDK8Uri -OutFile azulJDK8.zip
-Invoke-WebRequest -UseBasicParsing -Uri $azulJDK11Uri -OutFile azulJDK11.zip
-Invoke-WebRequest -UseBasicParsing -Uri $azulJDK13Uri -OutFile azulJDK13.zip
-
-# Expand the zips
-Expand-Archive -Path azulJDK7.zip -DestinationPath "C:\Program Files\Java\" -Force
-Expand-Archive -Path azulJDK8.zip -DestinationPath "C:\Program Files\Java\" -Force
-Expand-Archive -Path azulJDK11.zip -DestinationPath "C:\Program Files\Java\" -Force
-Expand-Archive -Path azulJDK13.zip -DestinationPath "C:\Program Files\Java\" -Force
-
-# Deleting zip folders
-Remove-Item -Recurse -Force azulJDK7.zip
-Remove-Item -Recurse -Force azulJDK8.zip
-Remove-Item -Recurse -Force azulJDK11.zip
-Remove-Item -Recurse -Force azulJDK13.zip
-
-Import-Module -Name ImageHelpers -Force
+foreach ($azulJDKURL in $azulJDKURLs)
+{
+ $archivePath = Start-DownloadWithRetry -Url $azulJDKURL -Name $([IO.Path]::GetFileName($azulJDKURL))
+ Expand-Archive -Path $archivePath -DestinationPath "C:\Program Files\Java\"
+}
$currentPath = Get-MachinePath
@@ -38,7 +27,7 @@ $newPathSegments = @()
foreach ($pathSegment in $pathSegments)
{
- if($pathSegment -notlike '*java*')
+ if ($pathSegment -notlike '*java*')
{
$newPathSegments += $pathSegment
}
@@ -93,14 +82,7 @@ setx MAVEN_OPTS $maven_opts /M
$uri = 'https://ayera.dl.sourceforge.net/project/cobertura/cobertura/2.1.1/cobertura-2.1.1-bin.zip'
$coberturaPath = "C:\cobertura-2.1.1"
-cd $env:TEMP
-
-Invoke-WebRequest -UseBasicParsing -Uri $uri -OutFile cobertura.zip
-
-# Expand the zip
-Expand-Archive -Path cobertura.zip -DestinationPath "C:\" -Force
-
-# Deleting zip folder
-Remove-Item -Recurse -Force cobertura.zip
+$archivePath = Start-DownloadWithRetry -Url $uri -Name "cobertura.zip"
+Expand-Archive -Path $archivePath -DestinationPath "C:\"
setx COBERTURA_HOME $coberturaPath /M
From ead5b53355485251a8f416b34246a51a9348436b Mon Sep 17 00:00:00 2001
From: Vladimir Safonkin
Date: Wed, 6 May 2020 07:20:39 +0300
Subject: [PATCH 05/13] Add retry logic for Selenium server download (#807)
* Add retry logic for selenium
* Refactoring
* Add retries for Selenium release info
* Minor fix
---
.../scripts/Installers/Install-Selenium.ps1 | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/images/win/scripts/Installers/Install-Selenium.ps1 b/images/win/scripts/Installers/Install-Selenium.ps1
index ac38c301..720e2803 100644
--- a/images/win/scripts/Installers/Install-Selenium.ps1
+++ b/images/win/scripts/Installers/Install-Selenium.ps1
@@ -3,6 +3,8 @@
## Desc: Install Selenium Server standalone
################################################################################
+Import-Module -Name ImageHelpers -Force
+
# Acquire latest Selenium release number from GitHub API
$latestReleaseUrl = "https://api.github.com/repos/SeleniumHQ/selenium/releases/latest"
try {
@@ -20,16 +22,13 @@ $seleniumVersion = [version]::Parse($seleniumVersionString)
Write-Host "Downloading selenium-server-standalone v$seleniumVersion..."
$seleniumReleaseUrl = "https://selenium-release.storage.googleapis.com/$($seleniumVersion.ToString(2))/selenium-server-standalone-$($seleniumVersion.ToString(3)).jar"
-New-Item -ItemType directory -Path "C:\selenium\"
-$seleniumBinPath = "C:\selenium\selenium-server-standalone.jar"
-try {
- Invoke-WebRequest -UseBasicParsing -Uri $seleniumReleaseUrl -OutFile $seleniumBinPath
-} catch {
- Write-Error $_
- exit 1
-}
+$seleniumDirectory = "C:\selenium\"
+$seleniumFileName = "selenium-server-standalone.jar"
+
+New-Item -ItemType directory -Path $seleniumDirectory
+
+Start-DownloadWithRetry -Url $seleniumReleaseUrl -Name $seleniumFileName -DownloadPath $seleniumDirectory
Write-Host "Add selenium jar to the environment variables..."
+$seleniumBinPath = Join-Path $seleniumDirectory $seleniumFileName
setx "SELENIUM_JAR_PATH" "$($seleniumBinPath)" /M
-
-exit 0
From 8491d71a0b76ae4a8572a27f683e396269bfa80c Mon Sep 17 00:00:00 2001
From: Vladimir Safonkin
Date: Wed, 6 May 2020 08:51:47 +0300
Subject: [PATCH 06/13] Fix kubectl installation (#799)
* Fix kubectl installation
* Fix kubectl installation
* Add --client flag
* Fix for ubuntu 16.04
* Move kubectl apt packages installation to basic.sh
* Combined separated scripts for kubectl installation to one
* Minor fix
* Remove apt-transport-https package from basic.sh
* Delete helm init
---
images/linux/scripts/installers/1604/basic.sh | 6 ++-
.../installers/1604/kubernetes-tools.sh | 40 -------------------
images/linux/scripts/installers/1804/basic.sh | 4 ++
.../installers/{1804 => }/kubernetes-tools.sh | 10 ++---
images/linux/ubuntu1604.json | 2 +-
images/linux/ubuntu1804.json | 2 +-
6 files changed, 13 insertions(+), 51 deletions(-)
delete mode 100644 images/linux/scripts/installers/1604/kubernetes-tools.sh
rename images/linux/scripts/installers/{1804 => }/kubernetes-tools.sh (79%)
diff --git a/images/linux/scripts/installers/1604/basic.sh b/images/linux/scripts/installers/1604/basic.sh
index e579e1c0..ef6bac32 100644
--- a/images/linux/scripts/installers/1604/basic.sh
+++ b/images/linux/scripts/installers/1604/basic.sh
@@ -40,7 +40,7 @@ apt-fast install -y --no-install-recommends \
zip \
zstd
-# Electron / VSCode / GitHub Desktop prereqs
+# Electron / VSCode / GitHub Desktop / kubectl prereqs
apt-fast install -y --no-install-recommends \
libxkbfile-dev \
pkg-config \
@@ -57,7 +57,8 @@ apt-fast install -y --no-install-recommends \
rpm \
xz-utils \
xorriso \
- zsync
+ zsync \
+ gnupg2
# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
@@ -99,3 +100,4 @@ DocumentInstalledItemIndent "upx"
DocumentInstalledItemIndent "wget"
DocumentInstalledItemIndent "zip"
DocumentInstalledItemIndent "zstd"
+DocumentInstalledItemIndent "gnupg2"
diff --git a/images/linux/scripts/installers/1604/kubernetes-tools.sh b/images/linux/scripts/installers/1604/kubernetes-tools.sh
deleted file mode 100644
index 4855dc71..00000000
--- a/images/linux/scripts/installers/1604/kubernetes-tools.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-################################################################################
-## File: kubernetes-tools.sh
-## Desc: Installs kubectl, helm
-################################################################################
-
-# Source the helpers for use with the script
-source $HELPER_SCRIPTS/document.sh
-source $HELPER_SCRIPTS/apt.sh
-
-## Install kubectl
-apt-get install -y apt-transport-https
-curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
-touch /etc/apt/sources.list.d/kubernetes.list
-echo "deb http://apt.kubernetes.io/ kubernetes-$(lsb_release -cs) main" | tee -a /etc/apt/sources.list.d/kubernetes.list
-apt-get update
-apt-get install -y kubectl
-
-# Install Helm
-curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
-
-# Run tests to determine that the software installed as expected
-echo "Testing to make sure that script performed as expected, and basic scenarios work"
-if ! command -v kubectl; then
- echo "kubectl was not installed"
- exit 1
-fi
-
-if ! command -v helm; then
- echo "helm was not installed"
- exit 1
-fi
-
-echo "Initializing helm"
-helm init --client-only
-
-# Document what was added to the image
-echo "Lastly, documenting what we added to the metadata file"
-DocumentInstalledItem "kubectl ($(kubectl version --short |& head -n 1))"
-DocumentInstalledItem "helm ($(helm version --short |& head -n 1))"
diff --git a/images/linux/scripts/installers/1804/basic.sh b/images/linux/scripts/installers/1804/basic.sh
index 29cb15b4..2b8c0018 100644
--- a/images/linux/scripts/installers/1804/basic.sh
+++ b/images/linux/scripts/installers/1804/basic.sh
@@ -130,6 +130,9 @@ apt-get install -y --no-install-recommends curl
echo "Install parallel"
apt-get install -y --no-install-recommends parallel
+echo "Install gnupg2"
+apt-get install -y --no-install-recommends gnupg2
+
# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
for cmd in curl file ftp jq netcat ssh parallel rsync shellcheck sudo telnet time unzip wget zip; do
@@ -168,3 +171,4 @@ DocumentInstalledItemIndent "upx"
DocumentInstalledItemIndent "wget"
DocumentInstalledItemIndent "zip"
DocumentInstalledItemIndent "zstd"
+DocumentInstalledItemIndent "gnupg2"
diff --git a/images/linux/scripts/installers/1804/kubernetes-tools.sh b/images/linux/scripts/installers/kubernetes-tools.sh
similarity index 79%
rename from images/linux/scripts/installers/1804/kubernetes-tools.sh
rename to images/linux/scripts/installers/kubernetes-tools.sh
index 38659028..6fcdb4c0 100644
--- a/images/linux/scripts/installers/1804/kubernetes-tools.sh
+++ b/images/linux/scripts/installers/kubernetes-tools.sh
@@ -9,12 +9,11 @@ source $HELPER_SCRIPTS/document.sh
source $HELPER_SCRIPTS/apt.sh
## Install kubectl
-apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
touch /etc/apt/sources.list.d/kubernetes.list
-# Based on https://kubernetes.io/docs/tasks/tools/install-kubectl/, package is still called xenial
-echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list
+# Based on https://kubernetes.io/docs/tasks/tools/install-kubectl/, package is xenial for both OS versions.
+echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list
apt-get update
apt-get install -y kubectl
@@ -33,10 +32,7 @@ if ! command -v helm; then
exit 1
fi
-echo "Initializing helm"
-helm init --client-only
-
# Document what was added to the image
echo "Lastly, documenting what we added to the metadata file"
-DocumentInstalledItem "kubectl ($(kubectl version --short |& head -n 1))"
+DocumentInstalledItem "kubectl ($(kubectl version --client --short |& head -n 1))"
DocumentInstalledItem "helm ($(helm version --short |& head -n 1))"
diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json
index a4f138db..b4c1846c 100644
--- a/images/linux/ubuntu1604.json
+++ b/images/linux/ubuntu1604.json
@@ -204,7 +204,7 @@
"{{template_dir}}/scripts/installers/image-magick.sh",
"{{template_dir}}/scripts/installers/java-tools.sh",
"{{template_dir}}/scripts/installers/kind.sh",
- "{{template_dir}}/scripts/installers/1604/kubernetes-tools.sh",
+ "{{template_dir}}/scripts/installers/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/leiningen.sh",
"{{template_dir}}/scripts/installers/1604/mercurial.sh",
"{{template_dir}}/scripts/installers/miniconda.sh",
diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json
index f72233e6..51a6ff9a 100644
--- a/images/linux/ubuntu1804.json
+++ b/images/linux/ubuntu1804.json
@@ -207,7 +207,7 @@
"{{template_dir}}/scripts/installers/image-magick.sh",
"{{template_dir}}/scripts/installers/java-tools.sh",
"{{template_dir}}/scripts/installers/kind.sh",
- "{{template_dir}}/scripts/installers/1804/kubernetes-tools.sh",
+ "{{template_dir}}/scripts/installers/kubernetes-tools.sh",
"{{template_dir}}/scripts/installers/leiningen.sh",
"{{template_dir}}/scripts/installers/1804/mercurial.sh",
"{{template_dir}}/scripts/installers/miniconda.sh",
From 17a441ec8e1aebc2977989bb08a929e7a8851edb Mon Sep 17 00:00:00 2001
From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com>
Date: Wed, 6 May 2020 09:44:53 +0300
Subject: [PATCH 07/13] Disable crash reporting (#826)
* disable jit debugger
* override settings asfter vs installation
---
images/win/Windows2016-Azure.json | 6 ++++++
images/win/Windows2019-Azure.json | 6 ++++++
.../scripts/Installers/Disable-JITDebugger.ps1 | 16 ++++++++++++++++
3 files changed, 28 insertions(+)
create mode 100644 images/win/scripts/Installers/Disable-JITDebugger.ps1
diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json
index 834de3af..50607342 100644
--- a/images/win/Windows2016-Azure.json
+++ b/images/win/Windows2016-Azure.json
@@ -944,6 +944,12 @@
"{{ template_dir }}/scripts/Installers/Configure-Antivirus.ps1"
]
},
+ {
+ "type": "powershell",
+ "scripts":[
+ "{{ template_dir }}/scripts/Installers/Disable-JITDebugger.ps1"
+ ]
+ },
{
"type": "powershell",
"inline": [
diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json
index 1b3e5f74..2a89973e 100644
--- a/images/win/Windows2019-Azure.json
+++ b/images/win/Windows2019-Azure.json
@@ -947,6 +947,12 @@
"{{ template_dir }}/scripts/Installers/Configure-Antivirus.ps1"
]
},
+ {
+ "type": "powershell",
+ "scripts":[
+ "{{ template_dir }}/scripts/Installers/Disable-JITDebugger.ps1"
+ ]
+ },
{
"type": "powershell",
"inline": [
diff --git a/images/win/scripts/Installers/Disable-JITDebugger.ps1 b/images/win/scripts/Installers/Disable-JITDebugger.ps1
new file mode 100644
index 00000000..1ae5d21b
--- /dev/null
+++ b/images/win/scripts/Installers/Disable-JITDebugger.ps1
@@ -0,0 +1,16 @@
+Write-Host "Disable Just-In-Time Debugger"
+
+# Turn off Application Error Debugger
+New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" -Name Debugger -Value "-" -Type String -Force
+New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug" -Name Debugger -Value "-" -Type String -Force
+
+# Turn off the Debug dialog
+New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\.NETFramework" -Name DbgManagedDebugger -Value "-" -Type String -Force
+New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework" -Name DbgManagedDebugger -Value "-" -Type String -Force
+
+# Disable the WER UI
+New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name DontShowUI -Value 1 -Type DWORD -Force
+# Send all reports to the user's queue
+New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name ForceQueue -Value 1 -Type DWORD -Force
+# Default consent choice 1 - Always ask (default)
+New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\Consent" -Name DefaultConsent -Value 1 -Type DWORD -Force
\ No newline at end of file
From 1833395768823217b56402e71733dd7b111aabd4 Mon Sep 17 00:00:00 2001
From: Vladimir Safonkin
Date: Wed, 6 May 2020 13:15:34 +0300
Subject: [PATCH 08/13] Fix maven environment variable (#831)
---
images/win/scripts/Installers/Install-JavaTools.ps1 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/images/win/scripts/Installers/Install-JavaTools.ps1 b/images/win/scripts/Installers/Install-JavaTools.ps1
index 8ab75910..455283d0 100644
--- a/images/win/scripts/Installers/Install-JavaTools.ps1
+++ b/images/win/scripts/Installers/Install-JavaTools.ps1
@@ -63,8 +63,7 @@ Choco-Install -PackageName maven -ArgumentList "-i", "--version=3.6.3"
Choco-Install -PackageName gradle
# Move maven variables to Machine. They may not be in the environment for this script so we need to read them from the registry.
-$userSid = (Get-WmiObject win32_useraccount -Filter "name = '$env:USERNAME' AND domain = '$env:USERDOMAIN'").SID
-$userEnvironmentKey = 'Registry::HKEY_USERS\' + $userSid + '\Environment'
+$userEnvironmentKey = 'Registry::HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment'
$m2_home = (Get-ItemProperty -Path $userEnvironmentKey -Name M2_HOME).M2_HOME
$m2 = $m2_home + '\bin'
From 48f3964fe67be7ba20761c4c186ba00418c3bb86 Mon Sep 17 00:00:00 2001
From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com>
Date: Thu, 7 May 2020 18:57:07 +0300
Subject: [PATCH 09/13] Updating readme file for macOS version 20200430.1
(#846)
---
images/macos/macos-10.15-Readme.md | 122 +++++++++++++++--------------
1 file changed, 63 insertions(+), 59 deletions(-)
diff --git a/images/macos/macos-10.15-Readme.md b/images/macos/macos-10.15-Readme.md
index e708126b..c0a030ad 100644
--- a/images/macos/macos-10.15-Readme.md
+++ b/images/macos/macos-10.15-Readme.md
@@ -2,7 +2,7 @@
- System Version: macOS 10.15.4 (19E287)
- Kernel Version: Darwin 19.4.0
- System Integrity Protection: Enabled
-- Image Version: 20200425.1
+- Image Version: 20200430.1
# Installed Software
## Language and Runtime
@@ -18,9 +18,9 @@
- gcc-9 (Homebrew GCC 9.3.0_1) 9.3.0
- GNU Fortran (Homebrew GCC 8.4.0_1) 8.4.0
- GNU Fortran (Homebrew GCC 9.3.0_1) 9.3.0
-- Node.js v12.16.2
+- Node.js v12.16.3
- NVM 0.33.11
-- NVM - Cached node versions: v6.17.1 v8.17.0 v10.20.1 v12.16.2 v13.13.0
+- NVM - Cached node versions: v6.17.1 v8.17.0 v10.20.1 v12.16.3 v13.14.0
- PowerShell 7.0.0
- Python 2.7.17
- Python 3.7.7
@@ -36,7 +36,7 @@
- Bundler version 2.1.4
- Carthage 0.34.0
- CocoaPods 1.9.1
-- Homebrew 2.2.13
+- Homebrew 2.2.14
- NPM 6.14.4
- Yarn 1.22.4
- NuGet 5.5.0.6382
@@ -50,7 +50,7 @@
- Gradle 6.3
## Utilities
-- Curl 7.69.1
+- Curl 7.70.0
- Git: 2.26.2
- Git LFS: 2.10.0
- Hub CLI: 2.14.2
@@ -74,20 +74,20 @@
## Tools
- Fastlane 2.146.1
-- Cmake 3.17.1
+- Cmake 3.17.2
- App Center CLI 2.5.0
-- Azure CLI 2.4.0
-- AWS CLI 2.0.9
-- AWS SAM CLI 0.47.0
+- Azure CLI 2.5.1
+- AWS CLI 2.0.10
+- AWS SAM CLI 0.48.0
- Aliyun CLI 3.0.39
## Browsers
- Safari 13.1 (15609.1.20.111.8)
- SafariDriver 13.1 (15609.1.20.111.8)
-- Google Chrome 81.0.4044.122
+- Google Chrome 81.0.4044.129
- ChromeDriver 81.0.4044.69
-- Microsoft Edge 81.0.416.64
-- MSEdgeDriver 81.0.416.64
+- Microsoft Edge 81.0.416.68
+- MSEdgeDriver 81.0.416.68
- Mozilla Firefox 75.0
- geckodriver 0.26.0
@@ -99,10 +99,10 @@
- 2.7.1
### Python
-- 2.7.17
+- 2.7.18
- 3.5.9
- 3.6.10
-- 3.7.6
+- 3.7.7
- 3.8.2
### PyPy
@@ -145,17 +145,18 @@
- NUnit 3.6.1
## Xcode
-| Version | Build | Path |
-| ---------------- | ------- | ------------------------------ |
-| 11.4.1 (default) | 11E503a | /Applications/Xcode_11.4.1.app |
-| 11.4 | 11E146 | /Applications/Xcode_11.4.app |
-| 11.3.1 | 11C505 | /Applications/Xcode_11.3.1.app |
-| 11.3 | 11C29 | /Applications/Xcode_11.3.app |
-| 11.2.1 | 11B500 | /Applications/Xcode_11.2.1.app |
-| 11.2 | 11B52 | /Applications/Xcode_11.2.app |
-| 11.1 | 11A1027 | /Applications/Xcode_11.1.app |
-| 11.0 | 11A420a | /Applications/Xcode_11.app |
-| 10.3 | 10G8 | /Applications/Xcode_10.3.app |
+| Version | Build | Path |
+| ---------------- | ------- | --------------------------------- |
+| 11.5 (beta) | 11N605c | /Applications/Xcode_11.5_beta.app |
+| 11.4.1 (default) | 11E503a | /Applications/Xcode_11.4.1.app |
+| 11.4 | 11E146 | /Applications/Xcode_11.4.app |
+| 11.3.1 | 11C505 | /Applications/Xcode_11.3.1.app |
+| 11.3 | 11C29 | /Applications/Xcode_11.3.app |
+| 11.2.1 | 11B500 | /Applications/Xcode_11.2.1.app |
+| 11.2 | 11B52 | /Applications/Xcode_11.2.app |
+| 11.1 | 11A1027 | /Applications/Xcode_11.1.app |
+| 11.0 | 11A420a | /Applications/Xcode_11.app |
+| 10.3 | 10G8 | /Applications/Xcode_10.3.app |
### Xcode Support Tools
- Nomad CLI 3.1.2
@@ -165,37 +166,39 @@
- xcversion 2.6.4
### Installed SDKs
-| SDK | SDK Name | Xcode Version |
-| ----------------------- | -------------------- | ---------------------------------------------------- |
-| macOS 10.14 | macosx10.14 | 10.3 |
-| macOS 10.15 | macosx10.15 | 11.0, 11.1, 11.2, 11.2.1, 11.3, 11.3.1, 11.4, 11.4.1 |
-| iOS 12.4 | iphoneos12.4 | 10.3 |
-| iOS 13.0 | iphoneos13.0 | 11.0 |
-| iOS 13.1 | iphoneos13.1 | 11.1 |
-| iOS 13.2 | iphoneos13.2 | 11.2, 11.2.1, 11.3, 11.3.1 |
-| iOS 13.4 | iphoneos13.4 | 11.4, 11.4.1 |
-| Simulator - iOS 12.4 | iphonesimulator12.4 | 10.3 |
-| Simulator - iOS 13.0 | iphonesimulator13.0 | 11.0 |
-| Simulator - iOS 13.1 | iphonesimulator13.1 | 11.1 |
-| Simulator - iOS 13.2 | iphonesimulator13.2 | 11.2, 11.2.1, 11.3, 11.3.1 |
-| Simulator - iOS 13.4 | iphonesimulator13.4 | 11.4, 11.4.1 |
-| tvOS 12.4 | appletvos12.4 | 10.3 |
-| tvOS 13.0 | appletvos13.0 | 11.0, 11.1 |
-| tvOS 13.2 | appletvos13.2 | 11.2, 11.2.1, 11.3, 11.3.1 |
-| tvOS 13.4 | appletvos13.4 | 11.4, 11.4.1 |
-| Simulator - tvOS 12.4 | appletvsimulator12.4 | 10.3 |
-| Simulator - tvOS 13.0 | appletvsimulator13.0 | 11.0, 11.1 |
-| Simulator - tvOS 13.2 | appletvsimulator13.2 | 11.2, 11.2.1, 11.3, 11.3.1 |
-| Simulator - tvOS 13.4 | appletvsimulator13.4 | 11.4, 11.4.1 |
-| watchOS 5.3 | watchos5.3 | 10.3 |
-| watchOS 6.0 | watchos6.0 | 11.0, 11.1 |
-| watchOS 6.1 | watchos6.1 | 11.2, 11.2.1, 11.3, 11.3.1 |
-| watchOS 6.2 | watchos6.2 | 11.4, 11.4.1 |
-| Simulator - watchOS 5.3 | watchsimulator5.3 | 10.3 |
-| Simulator - watchOS 6.0 | watchsimulator6.0 | 11.0, 11.1 |
-| Simulator - watchOS 6.1 | watchsimulator6.1 | 11.2, 11.2.1, 11.3, 11.3.1 |
-| Simulator - watchOS 6.2 | watchsimulator6.2 | 11.4, 11.4.1 |
-| DriverKit 19.0 | driverkit.macosx19.0 | 11.0, 11.1, 11.2, 11.2.1, 11.3, 11.3.1, 11.4, 11.4.1 |
+| SDK | SDK Name | Xcode Version |
+| ----------------------- | -------------------- | ---------------------------------------------------------- |
+| macOS 10.14 | macosx10.14 | 10.3 |
+| macOS 10.15 | macosx10.15 | 11.0, 11.1, 11.2, 11.2.1, 11.3, 11.3.1, 11.4, 11.4.1, 11.5 |
+| iOS 12.4 | iphoneos12.4 | 10.3 |
+| iOS 13.0 | iphoneos13.0 | 11.0 |
+| iOS 13.1 | iphoneos13.1 | 11.1 |
+| iOS 13.2 | iphoneos13.2 | 11.2, 11.2.1, 11.3, 11.3.1 |
+| iOS 13.4 | iphoneos13.4 | 11.4, 11.4.1 |
+| iOS 13.5 | iphoneos13.5 | 11.5 |
+| Simulator - iOS 12.4 | iphonesimulator12.4 | 10.3 |
+| Simulator - iOS 13.0 | iphonesimulator13.0 | 11.0 |
+| Simulator - iOS 13.1 | iphonesimulator13.1 | 11.1 |
+| Simulator - iOS 13.2 | iphonesimulator13.2 | 11.2, 11.2.1, 11.3, 11.3.1 |
+| Simulator - iOS 13.4 | iphonesimulator13.4 | 11.4, 11.4.1 |
+| Simulator - iOS 13.5 | iphonesimulator13.5 | 11.5 |
+| tvOS 12.4 | appletvos12.4 | 10.3 |
+| tvOS 13.0 | appletvos13.0 | 11.0, 11.1 |
+| tvOS 13.2 | appletvos13.2 | 11.2, 11.2.1, 11.3, 11.3.1 |
+| tvOS 13.4 | appletvos13.4 | 11.4, 11.4.1, 11.5 |
+| Simulator - tvOS 12.4 | appletvsimulator12.4 | 10.3 |
+| Simulator - tvOS 13.0 | appletvsimulator13.0 | 11.0, 11.1 |
+| Simulator - tvOS 13.2 | appletvsimulator13.2 | 11.2, 11.2.1, 11.3, 11.3.1 |
+| Simulator - tvOS 13.4 | appletvsimulator13.4 | 11.4, 11.4.1, 11.5 |
+| watchOS 5.3 | watchos5.3 | 10.3 |
+| watchOS 6.0 | watchos6.0 | 11.0, 11.1 |
+| watchOS 6.1 | watchos6.1 | 11.2, 11.2.1, 11.3, 11.3.1 |
+| watchOS 6.2 | watchos6.2 | 11.4, 11.4.1, 11.5 |
+| Simulator - watchOS 5.3 | watchsimulator5.3 | 10.3 |
+| Simulator - watchOS 6.0 | watchsimulator6.0 | 11.0, 11.1 |
+| Simulator - watchOS 6.1 | watchsimulator6.1 | 11.2, 11.2.1, 11.3, 11.3.1 |
+| Simulator - watchOS 6.2 | watchsimulator6.2 | 11.4, 11.4.1, 11.5 |
+| DriverKit 19.0 | driverkit.macosx19.0 | 11.0, 11.1, 11.2, 11.2.1, 11.3, 11.3.1, 11.4, 11.4.1, 11.5 |
### Installed Simulators
| OS | Xcode Version | Simulators |
@@ -205,16 +208,17 @@
| iOS 13.1 | 11.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) |
| iOS 13.2 | 11.2
11.2.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) |
| iOS 13.3 | 11.3
11.3.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) |
-| iOS 13.4 | 11.4
11.4.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad (7th generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Air (3rd generation)
iPhone SE (2nd generation) |
+| iOS 13.4 | 11.4
11.4.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone SE (2nd generation)
iPad Pro (9.7-inch)
iPad (7th generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Air (3rd generation) |
+| iOS 13.5 | 11.5 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone SE (2nd generation)
iPad Pro (9.7-inch)
iPad (7th generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Air (3rd generation) |
| tvOS 12.4 | 10.3 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) |
| tvOS 13.0 | 11.0
11.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) |
| tvOS 13.2 | 11.2
11.2.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) |
| tvOS 13.3 | 11.3
11.3.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) |
-| tvOS 13.4 | 11.4
11.4.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) |
+| tvOS 13.4 | 11.4
11.4.1
11.5 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) |
| watchOS 5.3 | 10.3 | Apple Watch Series 2 - 38mm
Apple Watch Series 2 - 42mm
Apple Watch Series 3 - 38mm
Apple Watch Series 3 - 42mm
Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm |
| watchOS 6.0 | 11.0
11.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm |
| watchOS 6.1 | 11.2
11.2.1
11.3
11.3.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm |
-| watchOS 6.2 | 11.4
11.4.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm |
+| watchOS 6.2 | 11.4
11.4.1
11.5 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm |
## Android
### Android SDK Tools
From 68fdb181e5dde13a4d1880c6e7798f629a36aeb5 Mon Sep 17 00:00:00 2001
From: Dmitry Shibanov
Date: Fri, 8 May 2020 11:14:27 +0000
Subject: [PATCH 10/13] Add nodejs toolcache for windows (#840)
* add installation of nodejs
Co-authored-by: Dmitry Shibanov
---
images/win/scripts/Installers/Validate-Toolset.ps1 | 5 ++++-
images/win/toolset-2016.json | 12 ++++++++++++
images/win/toolset-2019.json | 12 ++++++++++++
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/images/win/scripts/Installers/Validate-Toolset.ps1 b/images/win/scripts/Installers/Validate-Toolset.ps1
index 28963b12..34c613d9 100644
--- a/images/win/scripts/Installers/Validate-Toolset.ps1
+++ b/images/win/scripts/Installers/Validate-Toolset.ps1
@@ -62,7 +62,10 @@ $ErrorActionPreference = "Stop"
Import-Module -Name ImageHelpers -Force
# Define executables for cached tools
-$toolsExecutables = @{ Python = @("python.exe", "Scripts\pip.exe") }
+$toolsExecutables = @{
+ Python = @("python.exe", "Scripts\pip.exe");
+ node = @("node.exe", "npm")
+}
# Get toolcache content from toolset
$tools = Get-ToolsetContent | Select-Object -ExpandProperty toolcache
diff --git a/images/win/toolset-2016.json b/images/win/toolset-2016.json
index da372c49..c1500a4a 100644
--- a/images/win/toolset-2016.json
+++ b/images/win/toolset-2016.json
@@ -26,6 +26,18 @@
"3.7.*",
"3.8.*"
]
+ },
+ {
+ "name": "node",
+ "url" : "https://raw.githubusercontent.com/actions/node-versions/master/versions-manifest.json",
+ "arch": "x64",
+ "platform" : "win32",
+ "versions": [
+ "8.*",
+ "10.*",
+ "12.*",
+ "14.*"
+ ]
}
]
}
\ No newline at end of file
diff --git a/images/win/toolset-2019.json b/images/win/toolset-2019.json
index da372c49..c1500a4a 100644
--- a/images/win/toolset-2019.json
+++ b/images/win/toolset-2019.json
@@ -26,6 +26,18 @@
"3.7.*",
"3.8.*"
]
+ },
+ {
+ "name": "node",
+ "url" : "https://raw.githubusercontent.com/actions/node-versions/master/versions-manifest.json",
+ "arch": "x64",
+ "platform" : "win32",
+ "versions": [
+ "8.*",
+ "10.*",
+ "12.*",
+ "14.*"
+ ]
}
]
}
\ No newline at end of file
From 9b1143ddddc87e3924cc36a7cefc3d14c4bf10cb Mon Sep 17 00:00:00 2001
From: Dmitry Shibanov
Date: Sat, 9 May 2020 04:31:49 +0000
Subject: [PATCH 11/13] Add nodejs tool cache for linux. (#839)
* add nodejs
* 4 node versions
Co-authored-by: Dmitry Shibanov
---
images/linux/scripts/installers/Install-Toolset.ps1 | 3 ++-
images/linux/scripts/installers/Validate-Toolset.ps1 | 5 ++++-
images/linux/toolset-1604.json | 12 ++++++++++++
images/linux/toolset-1804.json | 12 ++++++++++++
images/linux/ubuntu1604.json | 12 ++++++------
images/linux/ubuntu1804.json | 12 ++++++------
6 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/images/linux/scripts/installers/Install-Toolset.ps1 b/images/linux/scripts/installers/Install-Toolset.ps1
index 518a1f9b..b6e4abbd 100644
--- a/images/linux/scripts/installers/Install-Toolset.ps1
+++ b/images/linux/scripts/installers/Install-Toolset.ps1
@@ -52,4 +52,5 @@ foreach ($tool in $tools) {
}
}
-chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/Python
\ No newline at end of file
+chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/Python
+chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/node
\ No newline at end of file
diff --git a/images/linux/scripts/installers/Validate-Toolset.ps1 b/images/linux/scripts/installers/Validate-Toolset.ps1
index 13847465..e0b42b64 100644
--- a/images/linux/scripts/installers/Validate-Toolset.ps1
+++ b/images/linux/scripts/installers/Validate-Toolset.ps1
@@ -26,7 +26,10 @@ function Run-ExecutableTests {
$ErrorActionPreference = "Stop"
# Define executables for cached tools
-$toolsExecutables = @{ Python = @("python", "bin/pip") }
+$toolsExecutables = @{
+ Python = @("python", "bin/pip");
+ node = @("bin/node", "bin/npm")
+}
# Get toolset content
$toolsetJson = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw
diff --git a/images/linux/toolset-1604.json b/images/linux/toolset-1604.json
index e3953f81..23393b66 100644
--- a/images/linux/toolset-1604.json
+++ b/images/linux/toolset-1604.json
@@ -13,6 +13,18 @@
"3.7.*",
"3.8.*"
]
+ },
+ {
+ "name": "node",
+ "url" : "https://raw.githubusercontent.com/actions/node-versions/master/versions-manifest.json",
+ "platform" : "linux",
+ "arch": "x64",
+ "versions": [
+ "8.*",
+ "10.*",
+ "12.*",
+ "14.*"
+ ]
}
]
}
\ No newline at end of file
diff --git a/images/linux/toolset-1804.json b/images/linux/toolset-1804.json
index a854ae6b..188062c4 100644
--- a/images/linux/toolset-1804.json
+++ b/images/linux/toolset-1804.json
@@ -13,6 +13,18 @@
"3.7.*",
"3.8.*"
]
+ },
+ {
+ "name": "node",
+ "url" : "https://raw.githubusercontent.com/actions/node-versions/master/versions-manifest.json",
+ "platform" : "linux",
+ "arch": "x64",
+ "versions": [
+ "8.*",
+ "10.*",
+ "12.*",
+ "14.*"
+ ]
}
]
}
\ No newline at end of file
diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json
index b4c1846c..fc47d0e9 100644
--- a/images/linux/ubuntu1604.json
+++ b/images/linux/ubuntu1604.json
@@ -324,12 +324,6 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
- {
- "type": "shell",
- "scripts":[
- "{{template_dir}}/scripts/installers/validate-disk-space.sh"
- ]
- },
{
"type": "file",
"source": "{{user `metadata_file`}}",
@@ -345,6 +339,12 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
+ {
+ "type": "shell",
+ "scripts":[
+ "{{template_dir}}/scripts/installers/validate-disk-space.sh"
+ ]
+ },
{
"type": "file",
"source": "{{template_dir}}/config/ubuntu1604.conf",
diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json
index 51a6ff9a..2471106f 100644
--- a/images/linux/ubuntu1804.json
+++ b/images/linux/ubuntu1804.json
@@ -328,12 +328,6 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
- {
- "type": "shell",
- "scripts":[
- "{{template_dir}}/scripts/installers/validate-disk-space.sh"
- ]
- },
{
"type": "file",
"source": "{{user `metadata_file`}}",
@@ -349,6 +343,12 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
+ {
+ "type": "shell",
+ "scripts":[
+ "{{template_dir}}/scripts/installers/validate-disk-space.sh"
+ ]
+ },
{
"type": "file",
"source": "{{template_dir}}/config/ubuntu1804.conf",
From 09ed1695b209fb8aa276fa4f1774d70b749605bf Mon Sep 17 00:00:00 2001
From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com>
Date: Mon, 11 May 2020 10:39:09 +0300
Subject: [PATCH 12/13] Hide packages that are no longer required (#854)
* Updating readme file for macOS version 20200430.1
* hide AutomaticRemove info
---
images/linux/scripts/installers/dpkg-config.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/images/linux/scripts/installers/dpkg-config.sh b/images/linux/scripts/installers/dpkg-config.sh
index e92e4270..67b200ed 100644
--- a/images/linux/scripts/installers/dpkg-config.sh
+++ b/images/linux/scripts/installers/dpkg-config.sh
@@ -16,4 +16,10 @@ Dpkg::Options {
"--force-confdef";
"--force-confold";
}
-EOF
\ No newline at end of file
+EOF
+
+# hide information about packages that are no longer required
+cat <> /etc/apt/apt.conf.d/10apt-autoremove
+APT::Get::AutomaticRemove "0";
+APT::Get::HideAutoRemove "1";
+EOF
From ceef6d41d62c5304bbf6ccff4788b8a4d1a5d8f0 Mon Sep 17 00:00:00 2001
From: Dariy Nurgaleev <50947177+Darleev@users.noreply.github.com>
Date: Mon, 11 May 2020 16:30:59 +0700
Subject: [PATCH 13/13] added SSDT workload to VS 2019 (#844)
---
images/win/scripts/Installers/Windows2019/Install-VS2019.ps1 | 1 +
1 file changed, 1 insertion(+)
diff --git a/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1 b/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1
index 627ff18d..128d2ae3 100644
--- a/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1
+++ b/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1
@@ -33,6 +33,7 @@ $WorkLoads = '--allWorkloads --includeRecommended ' + `
'--add Microsoft.VisualStudio.Component.EntityFramework ' + `
'--add Microsoft.VisualStudio.Component.FSharp.Desktop ' + `
'--add Microsoft.VisualStudio.Component.LinqToSql ' + `
+ '--add Microsoft.VisualStudio.Component.SQL.SSDT ' + `
'--add Microsoft.VisualStudio.Component.PortableLibrary ' + `
'--add Microsoft.VisualStudio.Component.TeamOffice ' + `
'--add Microsoft.VisualStudio.Component.TestTools.CodedUITest ' + `