From cf9a92d64ebb7b289782fc9ce0598ebec8267434 Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Tue, 1 Sep 2020 15:53:26 +0300 Subject: [PATCH 01/21] add VS build tools installation, tests, reports, made minor changes to current VS install helper functions --- .../scripts/ImageHelpers/ImageHelpers.psm1 | 3 +- .../scripts/ImageHelpers/InstallHelpers.ps1 | 10 +---- .../ImageHelpers/VisualStudioHelpers.ps1 | 38 ++++++++++++++----- images/win/scripts/Installers/Install-VS.ps1 | 25 ++++++------ .../SoftwareReport.Generator.ps1 | 7 +++- .../SoftwareReport.VisualStudio.psm1 | 2 +- .../win/scripts/Tests/VisualStudio.Tests.ps1 | 16 +++++++- images/win/toolsets/toolset-2016.json | 3 ++ images/win/toolsets/toolset-2019.json | 3 ++ 9 files changed, 70 insertions(+), 37 deletions(-) diff --git a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 index e150e1a12..9441ac7a2 100644 --- a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 +++ b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 @@ -35,8 +35,7 @@ Export-ModuleMember -Function @( 'Get-EnvironmentVariable' 'Invoke-PesterTests' 'Get-VsCatalogJsonPath' - 'Get-VisualStudioPath' 'Install-AndroidSDKPackages' - 'Get-VisualStudioPackages' + 'Get-VisualStudioInstallation' 'Get-VisualStudioComponents' ) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index 282c03762..dc815eea7 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -266,14 +266,8 @@ function Get-VSExtensionVersion [string] $packageName ) - $instanceFolders = Get-ChildItem -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances" - if ($instanceFolders -is [array]) - { - Write-Host "More than one instance installed" - exit 1 - } - - $stateContent = Get-Content -Path (Join-Path $instanceFolders.FullName '\state.packages.json') + $instanceFolders = "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioInstallation -VSInstallType "VS").InstanceId + $stateContent = Get-Content -Path (Join-Path $instanceFolders '\state.packages.json') $state = $stateContent | ConvertFrom-Json $packageVersion = ($state.packages | Where-Object { $_.id -eq $packageName }).version diff --git a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 index 0fd6bc8b6..bf87912de 100644 --- a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 @@ -61,20 +61,40 @@ Function Install-VisualStudio } function Get-VsCatalogJsonPath { - $instanceFolder = Get-Item "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\*" | Select-Object -First 1 - return Join-Path $instanceFolder.FullName "catalog.json" + $instanceFolder = "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioInstallation -VSInstallType "VS").InstanceId + return Join-Path $instanceFolder "catalog.json" } -function Get-VisualStudioPath { - return (Get-VSSetupInstance | Select-VSSetupInstance -Product *).InstallationPath -} +function Get-VisualStudioInstallation { + Param + ( + [Parameter(Mandatory)] + [String] $VSInstallType + ) -function Get-VisualStudioPackages { - return (Get-VSSetupInstance | Select-VSSetupInstance -Product *).Packages + if ($VSInstallType -eq "VS") + { + $VSSelectionType = "*Enterprise*" + } + elseif ($VSInstallType -eq "BuildTools") + { + $VSSelectionType = "*Build*" + } + else + { + Write-Output "Visual Studio Installation type have to be 'VS' or 'BuildTools'" + exit 1 + } + return Get-VSSetupInstance | Select-VSSetupInstance -Product * | Where-Object -Property DisplayName -like $VSSelectionType } function Get-VisualStudioComponents { - Get-VisualStudioPackages | Where-Object type -in 'Component', 'Workload' | + Param + ( + [Parameter(Mandatory)] + [String] $VSInstallType + ) + (Get-VisualStudioInstallation -VSInstallType $VSInstallType).Packages | Where-Object type -in 'Component', 'Workload' | Sort-Object Id, Version | Select-Object @{n = 'Package'; e = {$_.Id}}, Version | Where-Object { $_.Package -notmatch "[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}" } -} \ No newline at end of file +} diff --git a/images/win/scripts/Installers/Install-VS.ps1 b/images/win/scripts/Installers/Install-VS.ps1 index ed4fca73f..9d075ce4a 100644 --- a/images/win/scripts/Installers/Install-VS.ps1 +++ b/images/win/scripts/Installers/Install-VS.ps1 @@ -1,38 +1,35 @@ ################################################################################ ## File: Install-VS.ps1 -## Desc: Install Visual Studio +## Desc: Install Visual Studio and build tools ################################################################################ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent $requiredComponents = $toolset.visualStudio.workloads | ForEach-Object { "--add $_" } +$buildRequiredComponents = $toolset.visualStudio.build_workloads | ForEach-Object { "--add $_" } $workLoads = @( "--allWorkloads --includeRecommended" $requiredComponents "--remove Component.CPython3.x64" ) $workLoadsArgument = [String]::Join(" ", $workLoads) +$buildWorkLoads = @( + "--includeRecommended" + $buildRequiredComponents +) +$buildWorkLoadsArgument = [String]::Join(" ", $buildWorkLoads) $releaseInPath = $toolset.visualStudio.edition $subVersion = $toolset.visualStudio.subversion $bootstrapperUrl = "https://aka.ms/vs/${subVersion}/release/vs_${releaseInPath}.exe" +$buildbootstrapperUrl = "https://aka.ms/vs/${subVersion}/release/vs_buildtools.exe" -# Install VS +# Install VS and VS Build tools Install-VisualStudio -BootstrapperUrl $bootstrapperUrl -WorkLoads $workLoadsArgument +Install-VisualStudio -BootstrapperUrl $buildbootstrapperUrl -WorkLoads $buildWorkLoadsArgument -# 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]) -{ - Write-Host "More than one instance installed" - exit 1 -} - -$vsInstallRoot = Get-VisualStudioPath +$vsInstallRoot = (Get-VisualStudioInstallation -VStype "VS").InstallationPath # Initialize Visual Studio Experimental Instance & "$vsInstallRoot\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index eb8b35f0d..e818a25d8 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -171,7 +171,12 @@ $markdown += New-MDNewLine $markdown += New-MDHeader "Workloads, components and extensions:" -Level 4 $markdown += New-MDNewLine -$markdown += ((Get-VisualStudioComponents) + (Get-VisualStudioExtensions)) | New-MDTable +$markdown += ((Get-VisualStudioComponents -VSInstallType "VS") + (Get-VisualStudioExtensions)) | New-MDTable +$markdown += New-MDNewLine + +$markdown += New-MDHeader "Build Workloads and components:" -Level 4 +$markdown += New-MDNewLine +$markdown += (Get-VisualStudioComponents -VSInstallType "BuildTools") | New-MDTable $markdown += New-MDNewLine $markdown += New-MDHeader "Microsoft Visual C++:" -Level 4 diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 index 0004c168b..ba6907b35 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 @@ -23,7 +23,7 @@ function Get-VisualStudioExtensions { # Wix $vs = (Get-VisualStudioVersion).Name.Split()[-1] $wixPackageVersion = Get-WixVersion - $wixExtensionVersion = (Get-VisualStudioPackages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version + $wixExtensionVersion = ((Get-VisualStudioInstallation -VSInstallType "VS").Packages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version # WDK $wdkPackageVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit' diff --git a/images/win/scripts/Tests/VisualStudio.Tests.ps1 b/images/win/scripts/Tests/VisualStudio.Tests.ps1 index 142a9917e..14806a5a5 100644 --- a/images/win/scripts/Tests/VisualStudio.Tests.ps1 +++ b/images/win/scripts/Tests/VisualStudio.Tests.ps1 @@ -5,7 +5,7 @@ Describe "Visual Studio" { } It "Devenv.exe" { - $vsInstallRoot = Get-VisualStudioPath + $vsInstallRoot = (Get-VisualStudioInstallation -VStype "VS").InstallationPath $devenvexePath = "${vsInstallRoot}\Common7\IDE\devenv.exe" $devenvexePath | Should -Exist } @@ -15,7 +15,19 @@ Describe "Visual Studio" { $expectedComponents = Get-ToolsetContent | Select-Object -ExpandProperty visualStudio | Select-Object -ExpandProperty workloads $testCases = $expectedComponents | ForEach-Object { @{ComponentName = $_} } BeforeAll { - $installedComponents = Get-VisualStudioComponents | Select-Object -ExpandProperty Package + $installedComponents = Get-VisualStudioComponents -VSInstallType "VS" | Select-Object -ExpandProperty Package + } + + It "" -TestCases $testCases { + $installedComponents | Should -Contain $ComponentName + } + } + + Context "Visual Studio build components" { + $expectedComponents = Get-ToolsetContent | Select-Object -ExpandProperty visualStudio | Select-Object -ExpandProperty build_workloads + $testCases = $expectedComponents | ForEach-Object { @{ComponentName = $_} } + BeforeAll { + $installedComponents = Get-VisualStudioComponents -VSInstallType "Build" | Select-Object -ExpandProperty Package } It "" -TestCases $testCases { diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index f01e9473c..d9a5a3259 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -226,6 +226,9 @@ "Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre", "Microsoft.VisualStudio.Component.Workflow", "Microsoft.VisualStudio.Workload.Office" + ], + "build_workloads": [ + "Microsoft.VisualStudio.Workload.WebBuildTools" ] } } diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index e29552df3..684579e21 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -257,6 +257,9 @@ "Microsoft.VisualStudio.Workload.VisualStudioExtension", "Component.MDD.Linux", "Component.MDD.Linux.GCC.arm" + ], + "build_workloads": [ + "Microsoft.VisualStudio.Workload.WebBuildTools" ] } } From e1d821a0733d6dced74d1bf158dd8765eb17918f Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Tue, 1 Sep 2020 16:05:15 +0300 Subject: [PATCH 02/21] Vstype typo --- images/win/scripts/Installers/Install-VS.ps1 | 2 +- images/win/scripts/Tests/VisualStudio.Tests.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-VS.ps1 b/images/win/scripts/Installers/Install-VS.ps1 index 9d075ce4a..af834b621 100644 --- a/images/win/scripts/Installers/Install-VS.ps1 +++ b/images/win/scripts/Installers/Install-VS.ps1 @@ -29,7 +29,7 @@ $buildbootstrapperUrl = "https://aka.ms/vs/${subVersion}/release/vs_buildtools.e Install-VisualStudio -BootstrapperUrl $bootstrapperUrl -WorkLoads $workLoadsArgument Install-VisualStudio -BootstrapperUrl $buildbootstrapperUrl -WorkLoads $buildWorkLoadsArgument -$vsInstallRoot = (Get-VisualStudioInstallation -VStype "VS").InstallationPath +$vsInstallRoot = (Get-VisualStudioInstallation -VSInstallType "VS").InstallationPath # Initialize Visual Studio Experimental Instance & "$vsInstallRoot\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit diff --git a/images/win/scripts/Tests/VisualStudio.Tests.ps1 b/images/win/scripts/Tests/VisualStudio.Tests.ps1 index 14806a5a5..315e7e5c2 100644 --- a/images/win/scripts/Tests/VisualStudio.Tests.ps1 +++ b/images/win/scripts/Tests/VisualStudio.Tests.ps1 @@ -5,7 +5,7 @@ Describe "Visual Studio" { } It "Devenv.exe" { - $vsInstallRoot = (Get-VisualStudioInstallation -VStype "VS").InstallationPath + $vsInstallRoot = (Get-VisualStudioInstallation -VSInstallType "VS").InstallationPath $devenvexePath = "${vsInstallRoot}\Common7\IDE\devenv.exe" $devenvexePath | Should -Exist } From ade2f9d34a48bac7ead22af7aa8e0b506a6a6b5f Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Tue, 1 Sep 2020 16:17:55 +0300 Subject: [PATCH 03/21] removed unused variable --- images/win/scripts/ImageHelpers/InstallHelpers.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index dc815eea7..767391780 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -267,8 +267,7 @@ function Get-VSExtensionVersion ) $instanceFolders = "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioInstallation -VSInstallType "VS").InstanceId - $stateContent = Get-Content -Path (Join-Path $instanceFolders '\state.packages.json') - $state = $stateContent | ConvertFrom-Json + $state = Get-Content -Path (Join-Path $instanceFolders '\state.packages.json') | ConvertFrom-Json $packageVersion = ($state.packages | Where-Object { $_.id -eq $packageName }).version if (-not $packageVersion) From 425d62e593503b0b9df9bbcdd9173b0a6414f4bb Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Tue, 1 Sep 2020 17:22:57 +0300 Subject: [PATCH 04/21] validate set for new functions --- images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 index bf87912de..10e8d0cd8 100644 --- a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 @@ -69,6 +69,7 @@ function Get-VisualStudioInstallation { Param ( [Parameter(Mandatory)] + [ValidateSet('VS','BuildTools')] [String] $VSInstallType ) @@ -92,6 +93,7 @@ function Get-VisualStudioComponents { Param ( [Parameter(Mandatory)] + [ValidateSet('VS','BuildTools')] [String] $VSInstallType ) (Get-VisualStudioInstallation -VSInstallType $VSInstallType).Packages | Where-Object type -in 'Component', 'Workload' | From fdf40a931b7c67d27cc7710959b0f146b77ea88f Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Tue, 1 Sep 2020 22:05:26 +0300 Subject: [PATCH 05/21] some variable names clarifications --- .../scripts/ImageHelpers/ImageHelpers.psm1 | 2 +- .../scripts/ImageHelpers/InstallHelpers.ps1 | 21 --------- .../ImageHelpers/VisualStudioHelpers.ps1 | 43 +++++++++++++------ images/win/scripts/Installers/Install-VS.ps1 | 10 ++--- .../SoftwareReport.Generator.ps1 | 6 +-- .../SoftwareReport.VisualStudio.psm1 | 2 +- .../win/scripts/Tests/VisualStudio.Tests.ps1 | 10 ++--- images/win/toolsets/toolset-2016.json | 2 +- images/win/toolsets/toolset-2019.json | 2 +- 9 files changed, 46 insertions(+), 52 deletions(-) diff --git a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 index 9441ac7a2..07b406621 100644 --- a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 +++ b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 @@ -36,6 +36,6 @@ Export-ModuleMember -Function @( 'Invoke-PesterTests' 'Get-VsCatalogJsonPath' 'Install-AndroidSDKPackages' - 'Get-VisualStudioInstallation' + 'Get-VisualStudioProduct' 'Get-VisualStudioComponents' ) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index 767391780..9f1a32f6a 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -258,27 +258,6 @@ function Install-VsixExtension } } -function Get-VSExtensionVersion -{ - Param - ( - [Parameter(Mandatory=$true)] - [string] $packageName - ) - - $instanceFolders = "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioInstallation -VSInstallType "VS").InstanceId - $state = Get-Content -Path (Join-Path $instanceFolders '\state.packages.json') | ConvertFrom-Json - $packageVersion = ($state.packages | Where-Object { $_.id -eq $packageName }).version - - if (-not $packageVersion) - { - Write-Host "installed package $packageName for Visual Studio 2019 was not found" - exit 1 - } - - return $packageVersion -} - function Get-ToolcachePackages { $toolcachePath = Join-Path $env:ROOT_FOLDER "toolcache.json" diff --git a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 index 10e8d0cd8..8be653f42 100644 --- a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 @@ -61,31 +61,26 @@ Function Install-VisualStudio } function Get-VsCatalogJsonPath { - $instanceFolder = "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioInstallation -VSInstallType "VS").InstanceId + $instanceFolder = "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioProduct -ProductType "VisualStudio").InstanceId return Join-Path $instanceFolder "catalog.json" } -function Get-VisualStudioInstallation { +function Get-VisualStudioProduct { Param ( [Parameter(Mandatory)] - [ValidateSet('VS','BuildTools')] - [String] $VSInstallType + [ValidateSet('VisualStudio','BuildTools')] + [String] $ProductType ) - if ($VSInstallType -eq "VS") + if ($ProductType -eq "VisualStudio") { $VSSelectionType = "*Enterprise*" } - elseif ($VSInstallType -eq "BuildTools") + elseif ($ProductType -eq "BuildTools") { $VSSelectionType = "*Build*" } - else - { - Write-Output "Visual Studio Installation type have to be 'VS' or 'BuildTools'" - exit 1 - } return Get-VSSetupInstance | Select-VSSetupInstance -Product * | Where-Object -Property DisplayName -like $VSSelectionType } @@ -93,10 +88,30 @@ function Get-VisualStudioComponents { Param ( [Parameter(Mandatory)] - [ValidateSet('VS','BuildTools')] - [String] $VSInstallType + [String] $ProductType ) - (Get-VisualStudioInstallation -VSInstallType $VSInstallType).Packages | Where-Object type -in 'Component', 'Workload' | + (Get-VisualStudioProduct -ProductType $ProductType).Packages | Where-Object type -in 'Component', 'Workload' | Sort-Object Id, Version | Select-Object @{n = 'Package'; e = {$_.Id}}, Version | Where-Object { $_.Package -notmatch "[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}" } } + +function Get-VSExtensionVersion +{ + Param + ( + [Parameter(Mandatory=$true)] + [string] $packageName + ) + + $instanceFolders = "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioProduct -ProductType "VisualStudio").InstanceId + $state = Get-Content -Path (Join-Path $instanceFolders '\state.packages.json') | ConvertFrom-Json + $packageVersion = ($state.packages | Where-Object { $_.id -eq $packageName }).version + + if (-not $packageVersion) + { + Write-Host "installed package $packageName for Visual Studio 2019 was not found" + exit 1 + } + + return $packageVersion +} diff --git a/images/win/scripts/Installers/Install-VS.ps1 b/images/win/scripts/Installers/Install-VS.ps1 index af834b621..be776dded 100644 --- a/images/win/scripts/Installers/Install-VS.ps1 +++ b/images/win/scripts/Installers/Install-VS.ps1 @@ -7,18 +7,18 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent $requiredComponents = $toolset.visualStudio.workloads | ForEach-Object { "--add $_" } -$buildRequiredComponents = $toolset.visualStudio.build_workloads | ForEach-Object { "--add $_" } +$buildToolsRequiredComponents = $toolset.visualStudio.buildtools_workloads | ForEach-Object { "--add $_" } $workLoads = @( "--allWorkloads --includeRecommended" $requiredComponents "--remove Component.CPython3.x64" ) $workLoadsArgument = [String]::Join(" ", $workLoads) -$buildWorkLoads = @( +$buildToolsWorkloads= @( "--includeRecommended" - $buildRequiredComponents + $buildToolsRequiredComponents ) -$buildWorkLoadsArgument = [String]::Join(" ", $buildWorkLoads) +$buildWorkLoadsArgument = [String]::Join(" ", $buildToolsWorkloads) $releaseInPath = $toolset.visualStudio.edition $subVersion = $toolset.visualStudio.subversion @@ -29,7 +29,7 @@ $buildbootstrapperUrl = "https://aka.ms/vs/${subVersion}/release/vs_buildtools.e Install-VisualStudio -BootstrapperUrl $bootstrapperUrl -WorkLoads $workLoadsArgument Install-VisualStudio -BootstrapperUrl $buildbootstrapperUrl -WorkLoads $buildWorkLoadsArgument -$vsInstallRoot = (Get-VisualStudioInstallation -VSInstallType "VS").InstallationPath +$vsInstallRoot = (Get-VisualStudioProduct -ProductType "VisualStudio").InstallationPath # Initialize Visual Studio Experimental Instance & "$vsInstallRoot\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index e818a25d8..5ff886c77 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -171,12 +171,12 @@ $markdown += New-MDNewLine $markdown += New-MDHeader "Workloads, components and extensions:" -Level 4 $markdown += New-MDNewLine -$markdown += ((Get-VisualStudioComponents -VSInstallType "VS") + (Get-VisualStudioExtensions)) | New-MDTable +$markdown += ((Get-VisualStudioComponents -ProductType "VisualStudio") + (Get-VisualStudioExtensions)) | New-MDTable $markdown += New-MDNewLine -$markdown += New-MDHeader "Build Workloads and components:" -Level 4 +$markdown += New-MDHeader "Build Tools Workloads:" -Level 4 $markdown += New-MDNewLine -$markdown += (Get-VisualStudioComponents -VSInstallType "BuildTools") | New-MDTable +$markdown += (Get-VisualStudioComponents -ProductType "BuildTools") | New-MDTable $markdown += New-MDNewLine $markdown += New-MDHeader "Microsoft Visual C++:" -Level 4 diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 index ba6907b35..9d1e3941a 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 @@ -23,7 +23,7 @@ function Get-VisualStudioExtensions { # Wix $vs = (Get-VisualStudioVersion).Name.Split()[-1] $wixPackageVersion = Get-WixVersion - $wixExtensionVersion = ((Get-VisualStudioInstallation -VSInstallType "VS").Packages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version + $wixExtensionVersion = ((Get-VisualStudioProduct -ProductType "VisualStudio").Packages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version # WDK $wdkPackageVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit' diff --git a/images/win/scripts/Tests/VisualStudio.Tests.ps1 b/images/win/scripts/Tests/VisualStudio.Tests.ps1 index 315e7e5c2..0b56165a1 100644 --- a/images/win/scripts/Tests/VisualStudio.Tests.ps1 +++ b/images/win/scripts/Tests/VisualStudio.Tests.ps1 @@ -5,7 +5,7 @@ Describe "Visual Studio" { } It "Devenv.exe" { - $vsInstallRoot = (Get-VisualStudioInstallation -VSInstallType "VS").InstallationPath + $vsInstallRoot = (Get-VisualStudioProduct -ProductType "VisualStudio").InstallationPath $devenvexePath = "${vsInstallRoot}\Common7\IDE\devenv.exe" $devenvexePath | Should -Exist } @@ -15,7 +15,7 @@ Describe "Visual Studio" { $expectedComponents = Get-ToolsetContent | Select-Object -ExpandProperty visualStudio | Select-Object -ExpandProperty workloads $testCases = $expectedComponents | ForEach-Object { @{ComponentName = $_} } BeforeAll { - $installedComponents = Get-VisualStudioComponents -VSInstallType "VS" | Select-Object -ExpandProperty Package + $installedComponents = Get-VisualStudioComponents -ProductType "VisualStudio" | Select-Object -ExpandProperty Package } It "" -TestCases $testCases { @@ -23,11 +23,11 @@ Describe "Visual Studio" { } } - Context "Visual Studio build components" { - $expectedComponents = Get-ToolsetContent | Select-Object -ExpandProperty visualStudio | Select-Object -ExpandProperty build_workloads + Context "Visual Studio Build Tools components" { + $expectedComponents = Get-ToolsetContent | Select-Object -ExpandProperty visualStudio | Select-Object -ExpandProperty buildtools_workloads $testCases = $expectedComponents | ForEach-Object { @{ComponentName = $_} } BeforeAll { - $installedComponents = Get-VisualStudioComponents -VSInstallType "Build" | Select-Object -ExpandProperty Package + $installedComponents = Get-VisualStudioComponents -ProductType "Build" | Select-Object -ExpandProperty Package } It "" -TestCases $testCases { diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index d9a5a3259..feaa8e758 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -227,7 +227,7 @@ "Microsoft.VisualStudio.Component.Workflow", "Microsoft.VisualStudio.Workload.Office" ], - "build_workloads": [ + "buildtools_workloads": [ "Microsoft.VisualStudio.Workload.WebBuildTools" ] } diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 684579e21..4a5c0fecf 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -258,7 +258,7 @@ "Component.MDD.Linux", "Component.MDD.Linux.GCC.arm" ], - "build_workloads": [ + "buildtools_workloads": [ "Microsoft.VisualStudio.Workload.WebBuildTools" ] } From 26183d0fa773fdf6a62b834b398f2b9dda34faae Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Wed, 2 Sep 2020 16:43:01 +0300 Subject: [PATCH 06/21] test parameter error --- images/win/scripts/Tests/VisualStudio.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Tests/VisualStudio.Tests.ps1 b/images/win/scripts/Tests/VisualStudio.Tests.ps1 index 0b56165a1..34c59e2d9 100644 --- a/images/win/scripts/Tests/VisualStudio.Tests.ps1 +++ b/images/win/scripts/Tests/VisualStudio.Tests.ps1 @@ -27,7 +27,7 @@ Describe "Visual Studio" { $expectedComponents = Get-ToolsetContent | Select-Object -ExpandProperty visualStudio | Select-Object -ExpandProperty buildtools_workloads $testCases = $expectedComponents | ForEach-Object { @{ComponentName = $_} } BeforeAll { - $installedComponents = Get-VisualStudioComponents -ProductType "Build" | Select-Object -ExpandProperty Package + $installedComponents = Get-VisualStudioComponents -ProductType "BuildTools" | Select-Object -ExpandProperty Package } It "" -TestCases $testCases { From e438bd43025d12230714255eb77f22fed78b770b Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Thu, 3 Sep 2020 10:34:05 +0300 Subject: [PATCH 07/21] style and syntax improvments --- .../win/scripts/ImageHelpers/VisualStudioHelpers.ps1 | 12 +++++++----- images/win/scripts/Tests/VisualStudio.Tests.ps1 | 6 ++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 index 8be653f42..7c1b7a1cb 100644 --- a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 @@ -60,9 +60,12 @@ Function Install-VisualStudio } } +function Get-VisualStudioInstancePath { + return "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioProduct -ProductType "VisualStudio").InstanceId +} + function Get-VsCatalogJsonPath { - $instanceFolder = "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioProduct -ProductType "VisualStudio").InstanceId - return Join-Path $instanceFolder "catalog.json" + return Join-Path (Get-VisualStudioInstancePath) "catalog.json" } function Get-VisualStudioProduct { @@ -81,7 +84,7 @@ function Get-VisualStudioProduct { { $VSSelectionType = "*Build*" } - return Get-VSSetupInstance | Select-VSSetupInstance -Product * | Where-Object -Property DisplayName -like $VSSelectionType + return Get-VSSetupInstance | Where-Object -Property DisplayName -like $VSSelectionType } function Get-VisualStudioComponents { @@ -103,8 +106,7 @@ function Get-VSExtensionVersion [string] $packageName ) - $instanceFolders = "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioProduct -ProductType "VisualStudio").InstanceId - $state = Get-Content -Path (Join-Path $instanceFolders '\state.packages.json') | ConvertFrom-Json + $state = Get-Content -Path (Join-Path (Get-VisualStudioInstancePath) '\state.packages.json') | ConvertFrom-Json $packageVersion = ($state.packages | Where-Object { $_.id -eq $packageName }).version if (-not $packageVersion) diff --git a/images/win/scripts/Tests/VisualStudio.Tests.ps1 b/images/win/scripts/Tests/VisualStudio.Tests.ps1 index 34c59e2d9..56869cc91 100644 --- a/images/win/scripts/Tests/VisualStudio.Tests.ps1 +++ b/images/win/scripts/Tests/VisualStudio.Tests.ps1 @@ -12,8 +12,7 @@ Describe "Visual Studio" { } Context "Visual Studio components" { - $expectedComponents = Get-ToolsetContent | Select-Object -ExpandProperty visualStudio | Select-Object -ExpandProperty workloads - $testCases = $expectedComponents | ForEach-Object { @{ComponentName = $_} } + $testCases = (Get-ToolsetContent).visualStudio.workloads | ForEach-Object { @{ComponentName = $_} } BeforeAll { $installedComponents = Get-VisualStudioComponents -ProductType "VisualStudio" | Select-Object -ExpandProperty Package } @@ -24,8 +23,7 @@ Describe "Visual Studio" { } Context "Visual Studio Build Tools components" { - $expectedComponents = Get-ToolsetContent | Select-Object -ExpandProperty visualStudio | Select-Object -ExpandProperty buildtools_workloads - $testCases = $expectedComponents | ForEach-Object { @{ComponentName = $_} } + $testCases = (Get-ToolsetContent).visualStudio.buildtools_workloads | ForEach-Object { @{ComponentName = $_} } BeforeAll { $installedComponents = Get-VisualStudioComponents -ProductType "BuildTools" | Select-Object -ExpandProperty Package } From 2e6ca0ca5607ca389569e49ebdded79fed2b8a19 Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Mon, 7 Sep 2020 10:27:55 +0300 Subject: [PATCH 08/21] syntax notation --- images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 | 6 +++--- .../SoftwareReport/SoftwareReport.VisualStudio.psm1 | 8 ++++---- images/win/scripts/Tests/SSDTExtensions.Tests.ps1 | 4 ++-- images/win/scripts/Tests/WDK.Tests.ps1 | 2 +- images/win/scripts/Tests/Wix.Tests.ps1 | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 index 7c1b7a1cb..d9478390f 100644 --- a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 @@ -103,15 +103,15 @@ function Get-VSExtensionVersion Param ( [Parameter(Mandatory=$true)] - [string] $packageName + [string] $PackageName ) $state = Get-Content -Path (Join-Path (Get-VisualStudioInstancePath) '\state.packages.json') | ConvertFrom-Json - $packageVersion = ($state.packages | Where-Object { $_.id -eq $packageName }).version + $packageVersion = ($state.packages | Where-Object { $_.id -eq $PackageName }).version if (-not $packageVersion) { - Write-Host "installed package $packageName for Visual Studio 2019 was not found" + Write-Host "installed package $PackageName for Visual Studio 2019 was not found" exit 1 } diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 index 9d1e3941a..9427ccc3b 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 @@ -26,15 +26,15 @@ function Get-VisualStudioExtensions { $wixExtensionVersion = ((Get-VisualStudioProduct -ProductType "VisualStudio").Packages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version # WDK - $wdkPackageVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit' + $wdkPackageVersion = Get-VSExtensionVersion -PackageName 'Microsoft.Windows.DriverKit' $wdkExtensionVersion = Get-WDKVersion # SSDT - $analysisPackageVersion = Get-VSExtensionVersion -packageName '04a86fc2-dbd5-4222-848e-911638e487fe' - $reportingPackageVersion = Get-VSExtensionVersion -packageName '717ad572-c4b7-435c-c166-c2969777f718' + $analysisPackageVersion = Get-VSExtensionVersion -PackageName '04a86fc2-dbd5-4222-848e-911638e487fe' + $reportingPackageVersion = Get-VSExtensionVersion -PackageName '717ad572-c4b7-435c-c166-c2969777f718' $integrationPackageName = ($vs -match "2019") ? '851E7A09-7B2B-4F06-A15D-BABFCB26B970' : 'D1B09713-C12E-43CC-9EF4-6562298285AB' - $integrationPackageVersion = Get-VSExtensionVersion -packageName $integrationPackageName + $integrationPackageVersion = Get-VSExtensionVersion -PackageName $integrationPackageName $extensions = @( @{Package = 'SSDT Microsoft Analysis Services Projects'; Version = $analysisPackageVersion} diff --git a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 index 7d1c6ee0b..5b6031de5 100644 --- a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 +++ b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 @@ -9,12 +9,12 @@ Describe "SSDTExtensions" { ) It "Extensions id=" -TestCases $testExtenions { - $version = Get-VSExtensionVersion -packageName "${id}" + $version = Get-VSExtensionVersion -PackageName "${id}" $version | Should -Not -BeNullOrEmpty } } else { It "Extension SSDT" { - $version = Get-VSExtensionVersion -packageName "SSDT" + $version = Get-VSExtensionVersion -PackageName "SSDT" $version | Should -Not -BeNullOrEmpty } } diff --git a/images/win/scripts/Tests/WDK.Tests.ps1 b/images/win/scripts/Tests/WDK.Tests.ps1 index c67586e79..0f8e76770 100644 --- a/images/win/scripts/Tests/WDK.Tests.ps1 +++ b/images/win/scripts/Tests/WDK.Tests.ps1 @@ -5,7 +5,7 @@ Describe "WDK" { } It "WDK version from system" { - $version = Get-VSExtensionVersion -packageName "Microsoft.Windows.DriverKit" + $version = Get-VSExtensionVersion -PackageName "Microsoft.Windows.DriverKit" $version | Should -Not -BeNullOrEmpty } } diff --git a/images/win/scripts/Tests/Wix.Tests.ps1 b/images/win/scripts/Tests/Wix.Tests.ps1 index 2a12261e2..bd22bef36 100644 --- a/images/win/scripts/Tests/Wix.Tests.ps1 +++ b/images/win/scripts/Tests/Wix.Tests.ps1 @@ -12,11 +12,11 @@ Describe "Wix" { It "Wix Toolset version from system" { if (Test-IsWin19) { - $exVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev16" + $exVersion = Get-VSExtensionVersion -PackageName "WixToolset.VisualStudioExtension.Dev16" } else { - $exVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev15" + $exVersion = Get-VSExtensionVersion -PackageName "WixToolset.VisualStudioExtension.Dev15" } $exVersion | Should -Not -BeNullOrEmpty } From 865b3bf4cd0c6d0b24dbab6afbc693a2263d2627 Mon Sep 17 00:00:00 2001 From: "no-reply@microsoft.com" Date: Tue, 8 Sep 2020 06:56:18 +0000 Subject: [PATCH 09/21] Updating readme file for macos-10.15 version 20200903.1 --- images/macos/macos-10.15-Readme.md | 64 ++++++++++++++++-------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/images/macos/macos-10.15-Readme.md b/images/macos/macos-10.15-Readme.md index 2e0227806..325d4c7e7 100644 --- a/images/macos/macos-10.15-Readme.md +++ b/images/macos/macos-10.15-Readme.md @@ -1,7 +1,11 @@ -# macOS info +| Announcements | +|-| +| [Xcode 11.7 will be set as a default one on September, 9](https://github.com/actions/virtual-environments/issues/1537) | +*** +# macOS 10.15 info - System Version: macOS 10.15.6 (19G2021) - Kernel Version: Darwin 19.6.0 -- Image Version: 20200829.1 +- Image Version: 20200903.1 ## Installed Software ### Language and Runtime @@ -19,7 +23,7 @@ - .NET SDK 2.1.300 2.1.301 2.1.302 2.1.401 2.1.402 2.1.403 2.1.500 2.1.502 2.1.503 2.1.504 2.1.505 2.1.506 2.1.507 2.1.602 2.1.603 2.1.604 2.1.607 2.1.700 2.1.701 2.1.801 2.1.802 2.1.803 2.1.804 2.1.805 2.1.806 2.1.807 2.1.808 2.1.809 3.0.100 3.0.101 3.0.102 3.0.103 3.1.100 3.1.101 3.1.200 3.1.201 3.1.300 3.1.301 3.1.302 3.1.401 - R 4.0.2 - Go 1.15 -- PHP 7.4.9 +- PHP 7.4.10 - julia 1.5.1 ### Package Management @@ -27,7 +31,7 @@ - Bundler version 2.1.4 - Carthage 0.35.0 - CocoaPods 1.9.3 -- Homebrew 2.4.14 +- Homebrew 2.4.16 - NPM 6.14.6 - Yarn 1.22.5 - NuGet 5.6.0.6489 @@ -45,7 +49,7 @@ ### Utilities - Curl 7.72.0 - Git: 2.28.0 -- Git LFS: 2.11.0 +- Git LFS: 2.12.0 - GitHub CLI: 0.11.1 - Hub CLI: 2.14.2 - GNU Wget 1.20.3 @@ -54,30 +58,30 @@ - GNU parallel 20200722 - OpenSSL 1.0.2t 10 Sep 2019 `(/usr/local/opt/openssl -> /usr/local/Cellar/openssl/1.0.2t)` - jq 1.6 -- gpg (GnuPG) 2.2.21 +- gpg (GnuPG) 2.2.22 - psql (PostgreSQL) 12.4 - PostgreSQL 12.4 - aria2 1.35.0 - azcopy 10.6.0 - zstd 1.4.5 -- bazel 3.4.1 +- bazel 3.5.0 - bazelisk 1.6.1 -- helm v3.3.0+g8a4aeec +- helm v3.3.1+g249e521 - virtualbox 6.1.12r139181 - mongo v4.4.0 - mongod v4.4.0 - Vagrant 2.2.10 - 7-Zip 16.02 -- Newman 5.1.2 +- Newman 5.2.0 ### Tools -- Fastlane 2.157.2 +- Fastlane fastlane - Cmake 3.18.2 - App Center CLI 2.6.7 - Azure CLI 2.11.1 - AWS CLI 2.0.44 -- AWS SAM CLI 1.1.0 +- AWS SAM CLI 1.2.0 - AWS Session Manager CLI 1.1.61.0 - Aliyun CLI 3.0.56 - GHCup v0.1.10 @@ -94,9 +98,9 @@ - SafariDriver 13.1.2 (15609.3.5.1.3) - Google Chrome 85.0.4183.83 - ChromeDriver 85.0.4183.87 -- Microsoft Edge 85.0.564.41 -- MSEdgeDriver 85.0.564.41 -- Mozilla Firefox 80.0 +- Microsoft Edge 85.0.564.44 +- MSEdgeDriver 85.0.564.44 +- Mozilla Firefox 80.0.1 - geckodriver 0.27.0 ### Java @@ -136,8 +140,8 @@ - 1.11.13 - 1.12.17 - 1.13.15 -- 1.14.7 -- 1.15.0 +- 1.14.8 +- 1.15.1 ### Rust Tools - Rust 1.46.0 @@ -157,7 +161,7 @@ | ---------- | ------- | | Az | 4.6.1 | | MarkdownPS | 1.9 | -| Pester | 5.0.3 | +| Pester | 5.0.4 | ### Xamarin #### Visual Studio for Mac @@ -203,19 +207,19 @@ - NUnit 3.6.1 ### Xcode -| Version | Build | Path | -| -------------- | -------- | --------------------------------- | -| 12.0 (beta) | 12A8189n | /Applications/Xcode_12_beta.app | -| 11.7 (beta) | 11E801a | /Applications/Xcode_11.7_beta.app | -| 11.6 (default) | 11E708 | /Applications/Xcode_11.6.app | -| 11.5 | 11E608c | /Applications/Xcode_11.5.app | -| 11.4.1 | 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.2.1 | 11B500 | /Applications/Xcode_11.2.1.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 | +| -------------- | -------- | ------------------------------- | +| 12.0 (beta) | 12A8189n | /Applications/Xcode_12_beta.app | +| 11.7 (default) | 11E801a | /Applications/Xcode_11.7.app | +| 11.6 | 11E708 | /Applications/Xcode_11.6.app | +| 11.5 | 11E608c | /Applications/Xcode_11.5.app | +| 11.4.1 | 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.2.1 | 11B500 | /Applications/Xcode_11.2.1.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.4 From 5b40c3de56addd8f65e38244c5a950c0762fc227 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Tue, 8 Sep 2020 10:21:52 +0300 Subject: [PATCH 10/21] Update macos-10.15-Readme.md --- images/macos/macos-10.15-Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/macos/macos-10.15-Readme.md b/images/macos/macos-10.15-Readme.md index 325d4c7e7..3c57b80b5 100644 --- a/images/macos/macos-10.15-Readme.md +++ b/images/macos/macos-10.15-Readme.md @@ -76,7 +76,7 @@ ### Tools -- Fastlane fastlane +- Fastlane 2.157.2 - Cmake 3.18.2 - App Center CLI 2.6.7 - Azure CLI 2.11.1 From 2881a81b22886c8b13a8c9a982de512f82161a95 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Tue, 8 Sep 2020 14:40:56 +0300 Subject: [PATCH 11/21] move apt pkgs to the toolset.json --- images/linux/scripts/base/apt.sh | 6 +- .../linux/scripts/helpers/containercache.sh | 34 -------- images/linux/scripts/installers/basic.sh | 87 +------------------ .../linux/scripts/installers/docker-moby.sh | 42 ++++++--- images/linux/toolsets/toolset-1604.json | 64 +++++++++++++- images/linux/toolsets/toolset-1804.json | 63 +++++++++++++- images/linux/toolsets/toolset-2004.json | 62 +++++++++++++ images/linux/ubuntu1604.json | 37 +++----- images/linux/ubuntu1804.json | 37 +++----- images/linux/ubuntu2004.json | 37 +++----- 10 files changed, 263 insertions(+), 206 deletions(-) delete mode 100644 images/linux/scripts/helpers/containercache.sh diff --git a/images/linux/scripts/base/apt.sh b/images/linux/scripts/base/apt.sh index b7ad9e7bb..8afcbe8d2 100644 --- a/images/linux/scripts/base/apt.sh +++ b/images/linux/scripts/base/apt.sh @@ -11,8 +11,10 @@ systemctl disable apt-daily-upgrade.service # Configure apt to always assume Y echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes -# Use apt-fast for parallel downloads +# Install aria2 and jq apt-get install aria2 +apt-get install jq +# Use apt-fast for parallel downloads add-apt-repository -y ppa:apt-fast/stable apt-get update -apt-get -y install apt-fast +apt-get install apt-fast diff --git a/images/linux/scripts/helpers/containercache.sh b/images/linux/scripts/helpers/containercache.sh deleted file mode 100644 index 018bcf534..000000000 --- a/images/linux/scripts/helpers/containercache.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -################################################################################ -## File: containercache.sh -## Desc: Prepulls Docker images used in build tasks and templates -################################################################################ - -source $HELPER_SCRIPTS/document.sh - -# Check prereqs -echo "Checking prereqs for image pulls" -if ! command -v docker; then - echo "Docker is not installed, cant pull images" - exit 1 -fi - -# Information output -systemctl status docker --no-pager - -# Pull images -images=( - docker.io/jekyll/builder - mcr.microsoft.com/azure-pipelines/node8-typescript -) - -for image in "${images[@]}"; do - docker pull "$image" -done - -## Add container information to the metadata file - DocumentInstalledItem "Cached container images" - -while read -r line; do - DocumentInstalledItemIndent "$line" -done <<< "$(docker images --digests --format '{{.Repository}}:{{.Tag}} (Digest: {{.Digest}})')" diff --git a/images/linux/scripts/installers/basic.sh b/images/linux/scripts/installers/basic.sh index 0a9e0e1b4..d216bffb3 100644 --- a/images/linux/scripts/installers/basic.sh +++ b/images/linux/scripts/installers/basic.sh @@ -4,90 +4,13 @@ ## Desc: Installs basic command line utilities and dev packages ################################################################################ +set -e # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh -source $HELPER_SCRIPTS/os.sh - -set -e - -common_packages="dnsutils - iproute2 - iputils-ping - libunwind8 - locales - openssh-client - tzdata - upx - zstd - libxkbfile-dev - pkg-config - libsecret-1-dev - libxss1 - libgconf-2-4 - dbus - xvfb - libgbm-dev - libgtk-3-0 - tk - fakeroot - dpkg - rpm - xz-utils - xorriso - zsync - gnupg2 - lib32z1 - texinfo - libsqlite3-dev - libc++-dev - libc++abi-dev" - -cmd_packages="curl - file - ftp - jq - netcat - ssh - parallel - rsync - shellcheck - sudo - telnet - time - unzip - zip - wget - m4 - bison - flex - patchelf - bzip2 - sqlite3 - brotli - yamllint" - -if isUbuntu20 ; then - echo "Install python2" - apt-get install -y --no-install-recommends python-is-python2 -fi - -echo "Install libcurl" -if isUbuntu16 || isUbuntu18; then - libcurelVer="libcurl3" -fi - -if isUbuntu20 ; then - libcurelVer="libcurl4" -fi - -apt-get install -y --no-install-recommends $libcurelVer - -# install additional packages only for Ubuntu16.04 -if isUbuntu16; then - common_packages="$common_packages - libicu55" -fi +toolsetJson="$INSTALLER_SCRIPT_FOLDER/toolset.json" +common_packages=$(jq -r ".apt.common_packages[]" $toolsetJson) +cmd_packages=$(jq -r ".apt.cmd_packages[]" $toolsetJson) for package in $common_packages $cmd_packages; do echo "Install $package" apt-get install -y --no-install-recommends $package @@ -108,5 +31,3 @@ DocumentInstalledItem "Basic packages:" for package in $common_packages $cmd_packages; do DocumentInstalledItemIndent $package done - -DocumentInstalledItemIndent "$libcurelVer" diff --git a/images/linux/scripts/installers/docker-moby.sh b/images/linux/scripts/installers/docker-moby.sh index 7ab457de8..0ce51b7ec 100644 --- a/images/linux/scripts/installers/docker-moby.sh +++ b/images/linux/scripts/installers/docker-moby.sh @@ -49,19 +49,28 @@ else set +e fi -docker pull node:10 -docker pull node:12 -docker pull buildpack-deps:stretch -docker pull buildpack-deps:buster -docker pull node:10-alpine -docker pull node:12-alpine -docker pull debian:8 -docker pull debian:9 -docker pull alpine:3.7 -docker pull alpine:3.8 -docker pull alpine:3.9 -docker pull alpine:3.10 -docker pull ubuntu:14.04 +# Pull images +images=( + node:10 + node:12 + buildpack-deps:stretch + buildpack-deps:buster + node:10-alpine + node:12-alpine + debian:8 + debian:9 + alpine:3.7 + alpine:3.8 + alpine:3.9 + alpine:3.10 + ubuntu:14.04 + docker.io/jekyll/builder + mcr.microsoft.com/azure-pipelines/node8-typescript +) + +for image in "${images[@]}"; do + docker pull "$image" +done ## Add version information to the metadata file echo "Documenting Docker version" @@ -71,3 +80,10 @@ DocumentInstalledItem "Docker-Moby ($docker_version)" echo "Documenting Docker-buildx version" DOCKER_BUILDX_VERSION=$(docker buildx version | cut -d ' ' -f2) DocumentInstalledItem "Docker-Buildx ($DOCKER_BUILDX_VERSION)" + +## Add container information to the metadata file +DocumentInstalledItem "Cached container images" + +while read -r line; do + DocumentInstalledItemIndent "$line" +done <<< "$(docker images --digests --format '{{.Repository}}:{{.Tag}} (Digest: {{.Digest}})')" \ No newline at end of file diff --git a/images/linux/toolsets/toolset-1604.json b/images/linux/toolsets/toolset-1604.json index 40ea0af4b..f03740059 100644 --- a/images/linux/toolsets/toolset-1604.json +++ b/images/linux/toolsets/toolset-1604.json @@ -108,5 +108,67 @@ "4.6.0" ] } - ] + ], + "apt": { + "common_packages": [ + "dbus", + "dnsutils", + "dpkg", + "fakeroot", + "gnupg2", + "iproute2", + "iputils-ping", + "lib32z1", + "libc++abi-dev", + "libc++-dev", + "libcurl3", + "libgbm-dev", + "libgconf-2-4", + "libgtk-3-0", + "libicu55", + "libsecret-1-dev", + "libsqlite3-dev", + "libunwind8", + "libxkbfile-dev", + "libxss1", + "locales", + "openssh-client", + "pkg-config", + "rpm", + "texinfo", + "tk", + "tzdata", + "upx", + "xorriso", + "xvfb", + "xz-utils", + "zstd", + "zsync" + ], + "cmd_packages": [ + "bison", + "brotli", + "bzip2", + "curl", + "file", + "flex", + "ftp", + "jq", + "m4", + "netcat", + "parallel", + "patchelf", + "rsync", + "shellcheck", + "sqlite3", + "ssh", + "sudo", + "telnet", + "time", + "unzip", + "wget", + "yamllint", + "zip" + ] + } } diff --git a/images/linux/toolsets/toolset-1804.json b/images/linux/toolsets/toolset-1804.json index 1bd31b15d..f1ea16b56 100644 --- a/images/linux/toolsets/toolset-1804.json +++ b/images/linux/toolsets/toolset-1804.json @@ -104,5 +104,66 @@ "4.6.0" ] } - ] + ], + "apt": { + "common_packages": [ + "dbus", + "dnsutils", + "dpkg", + "fakeroot", + "gnupg2", + "iproute2", + "iputils-ping", + "lib32z1", + "libc++abi-dev", + "libc++-dev", + "libcurl3", + "libgbm-dev", + "libgconf-2-4", + "libgtk-3-0", + "libsecret-1-dev", + "libsqlite3-dev", + "libunwind8", + "libxkbfile-dev", + "libxss1", + "locales", + "openssh-client", + "pkg-config", + "rpm", + "texinfo", + "tk", + "tzdata", + "upx", + "xorriso", + "xvfb", + "xz-utils", + "zstd", + "zsync" + ], + "cmd_packages": [ + "bison", + "brotli", + "bzip2", + "curl", + "file", + "flex", + "ftp", + "jq", + "m4", + "netcat", + "parallel", + "patchelf", + "rsync", + "shellcheck", + "sqlite3", + "ssh", + "sudo", + "telnet", + "time", + "unzip", + "wget", + "yamllint", + "zip" + ] + } } diff --git a/images/linux/toolsets/toolset-2004.json b/images/linux/toolsets/toolset-2004.json index db07186fb..b4aa7ec41 100644 --- a/images/linux/toolsets/toolset-2004.json +++ b/images/linux/toolsets/toolset-2004.json @@ -67,5 +67,67 @@ "ndk-bundle", "platform-tools" ] + }, + "apt": { + "common_packages": [ + "dbus", + "dnsutils", + "dpkg", + "fakeroot", + "gnupg2", + "iproute2", + "iputils-ping", + "lib32z1", + "libc++abi-dev", + "libc++-dev", + "libcurl4", + "libgbm-dev", + "libgconf-2-4", + "libgtk-3-0", + "libsecret-1-dev", + "libsqlite3-dev", + "libunwind8", + "libxkbfile-dev", + "libxss1", + "locales", + "openssh-client", + "pkg-config", + "python-is-python2", + "rpm", + "texinfo", + "tk", + "tzdata", + "upx", + "xorriso", + "xvfb", + "xz-utils", + "zstd", + "zsync" + ], + "cmd_packages": [ + "bison", + "brotli", + "bzip2", + "curl", + "file", + "flex", + "ftp", + "jq", + "m4", + "netcat", + "parallel", + "patchelf", + "rsync", + "shellcheck", + "sqlite3", + "ssh", + "sudo", + "telnet", + "time", + "unzip", + "wget", + "yamllint", + "zip" + ] } } diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 3625b7ed2..c0d3b39d7 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -88,6 +88,16 @@ "source": "{{template_dir}}/scripts/installers", "destination": "{{user `installer_script_folder`}}" }, + { + "type": "file", + "source": "{{template_dir}}/toolsets/toolcache-1604.json", + "destination": "{{user `installer_script_folder`}}/toolcache.json" + }, + { + "type": "file", + "source": "{{template_dir}}/toolsets/toolset-1604.json", + "destination": "{{user `installer_script_folder`}}/toolset.json" + }, { "type": "shell", "scripts":[ @@ -198,31 +208,9 @@ "{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh", "{{template_dir}}/scripts/installers/swig.sh", - "{{template_dir}}/scripts/installers/netlify.sh" - ], - "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "DEBIAN_FRONTEND=noninteractive" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolcache-1604.json", - "destination": "{{user `installer_script_folder`}}/toolcache.json" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolset-1604.json", - "destination": "{{user `installer_script_folder`}}/toolset.json" - }, - { - "type": "shell", - "scripts":[ + "{{template_dir}}/scripts/installers/netlify.sh", "{{template_dir}}/scripts/installers/android.sh", "{{template_dir}}/scripts/installers/azpowershell.sh", - "{{template_dir}}/scripts/helpers/containercache.sh", "{{template_dir}}/scripts/installers/hosted-tool-cache.sh", "{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/python.sh", @@ -232,7 +220,8 @@ "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", - "GITHUB_FEED_TOKEN={{user `github_feed_token`}}" + "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", + "DEBIAN_FRONTEND=noninteractive" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index b5037520d..95de0713d 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -91,6 +91,16 @@ "source": "{{template_dir}}/scripts/installers", "destination": "{{user `installer_script_folder`}}" }, + { + "type": "file", + "source": "{{template_dir}}/toolsets/toolcache-1804.json", + "destination": "{{user `installer_script_folder`}}/toolcache.json" + }, + { + "type": "file", + "source": "{{template_dir}}/toolsets/toolset-1804.json", + "destination": "{{user `installer_script_folder`}}/toolset.json" + }, { "type": "shell", "scripts":[ @@ -202,31 +212,9 @@ "{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh", "{{template_dir}}/scripts/installers/swig.sh", - "{{template_dir}}/scripts/installers/netlify.sh" - ], - "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "DEBIAN_FRONTEND=noninteractive" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolcache-1804.json", - "destination": "{{user `installer_script_folder`}}/toolcache.json" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolset-1804.json", - "destination": "{{user `installer_script_folder`}}/toolset.json" - }, - { - "type": "shell", - "scripts":[ + "{{template_dir}}/scripts/installers/netlify.sh", "{{template_dir}}/scripts/installers/android.sh", "{{template_dir}}/scripts/installers/azpowershell.sh", - "{{template_dir}}/scripts/helpers/containercache.sh", "{{template_dir}}/scripts/installers/hosted-tool-cache.sh", "{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/python.sh", @@ -236,7 +224,8 @@ "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", - "GITHUB_FEED_TOKEN={{user `github_feed_token`}}" + "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", + "DEBIAN_FRONTEND=noninteractive" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index 48d309b1e..8e2b69e49 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -93,6 +93,16 @@ "source": "{{template_dir}}/scripts/installers", "destination": "{{user `installer_script_folder`}}" }, + { + "type": "file", + "source": "{{template_dir}}/toolsets/toolcache-2004.json", + "destination": "{{user `installer_script_folder`}}/toolcache.json" + }, + { + "type": "file", + "source": "{{template_dir}}/toolsets/toolset-2004.json", + "destination": "{{user `installer_script_folder`}}/toolset.json" + }, { "type": "shell", "scripts":[ @@ -204,31 +214,9 @@ "{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh", "{{template_dir}}/scripts/installers/swig.sh", - "{{template_dir}}/scripts/installers/netlify.sh" - ], - "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "DEBIAN_FRONTEND=noninteractive" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolcache-2004.json", - "destination": "{{user `installer_script_folder`}}/toolcache.json" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolset-2004.json", - "destination": "{{user `installer_script_folder`}}/toolset.json" - }, - { - "type": "shell", - "scripts":[ + "{{template_dir}}/scripts/installers/netlify.sh", "{{template_dir}}/scripts/installers/android.sh", "{{template_dir}}/scripts/installers/azpowershell.sh", - "{{template_dir}}/scripts/helpers/containercache.sh", "{{template_dir}}/scripts/installers/hosted-tool-cache.sh", "{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/python.sh", @@ -238,7 +226,8 @@ "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", - "GITHUB_FEED_TOKEN={{user `github_feed_token`}}" + "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", + "DEBIAN_FRONTEND=noninteractive" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, From b8d3652352384ed633a00f8dc43611ed7aa80582 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Tue, 8 Sep 2020 19:09:31 +0300 Subject: [PATCH 12/21] rename toolsetJson -> toolset --- images/linux/scripts/installers/android.sh | 12 ++++++------ images/linux/scripts/installers/azpowershell.sh | 4 ++-- images/linux/scripts/installers/basic.sh | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/images/linux/scripts/installers/android.sh b/images/linux/scripts/installers/android.sh index 73611e665..ed06f51ac 100644 --- a/images/linux/scripts/installers/android.sh +++ b/images/linux/scripts/installers/android.sh @@ -42,12 +42,12 @@ else exit 1 fi -toolsetJson="$INSTALLER_SCRIPT_FOLDER/toolset.json" -platforms=$(cat $toolsetJson | jq -r '.android.platform_list[]|"platforms;" + .') -buildtools=$(cat $toolsetJson | jq -r '.android.build_tools[]|"build-tools;" + .') -extras=$(cat $toolsetJson | jq -r '.android.extra_list[]|"extras;" + .') -addons=$(cat $toolsetJson | jq -r '.android.addon_list[]|"add-ons;" + .') -additional=$(cat $toolsetJson | jq -r '.android.additional_tools[]') +toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" +platforms=$(jq -r '.android.platform_list[]|"platforms;" + .' $toolset) +buildtools=$(jq -r '.android.build_tools[]|"build-tools;" + .' $toolset) +extras=$(jq -r '.android.extra_list[]|"extras;" + .' $toolset) +addons=$(jq -r '.android.addon_list[]|"add-ons;" + .' $toolset) +additional=$(jq -r '.android.additional_tools[]' $toolset) # Install the following SDKs and build tools, passing in "y" to accept licenses. echo "y" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager $platforms $buildtools $extras $google_api_list $addons $additional diff --git a/images/linux/scripts/installers/azpowershell.sh b/images/linux/scripts/installers/azpowershell.sh index 082ab185d..2b7d703df 100644 --- a/images/linux/scripts/installers/azpowershell.sh +++ b/images/linux/scripts/installers/azpowershell.sh @@ -12,8 +12,8 @@ source $HELPER_SCRIPTS/os.sh if isUbuntu20 ; then versions=$(pwsh -Command '(Find-Module -Name Az).Version') else - toolsetJson="$INSTALLER_SCRIPT_FOLDER/toolset.json" - versions=$(cat $toolsetJson | jq -r '.azureModules[] | select(.name | contains("az")) | .versions[]') + toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" + versions=$(jq -r '.azureModules[] | select(.name | contains("az")) | .versions[]' $toolset) fi # Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) diff --git a/images/linux/scripts/installers/basic.sh b/images/linux/scripts/installers/basic.sh index d216bffb3..0772cf4ed 100644 --- a/images/linux/scripts/installers/basic.sh +++ b/images/linux/scripts/installers/basic.sh @@ -8,9 +8,9 @@ set -e # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh -toolsetJson="$INSTALLER_SCRIPT_FOLDER/toolset.json" -common_packages=$(jq -r ".apt.common_packages[]" $toolsetJson) -cmd_packages=$(jq -r ".apt.cmd_packages[]" $toolsetJson) +toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" +common_packages=$(jq -r ".apt.common_packages[]" $toolset) +cmd_packages=$(jq -r ".apt.cmd_packages[]" $toolset) for package in $common_packages $cmd_packages; do echo "Install $package" apt-get install -y --no-install-recommends $package From 2f46bd5c7c9e4d04ba58932d20efd13e3fd3292c Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Tue, 8 Sep 2020 19:20:07 +0300 Subject: [PATCH 13/21] rename toolsetJson -> toolset --- images/linux/scripts/installers/Install-Toolset.ps1 | 4 ++-- images/linux/scripts/installers/Validate-Toolset.ps1 | 4 ++-- images/linux/scripts/installers/pypy.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/images/linux/scripts/installers/Install-Toolset.ps1 b/images/linux/scripts/installers/Install-Toolset.ps1 index e95645e53..1d261ff3f 100644 --- a/images/linux/scripts/installers/Install-Toolset.ps1 +++ b/images/linux/scripts/installers/Install-Toolset.ps1 @@ -27,10 +27,10 @@ Function Install-Asset { $ErrorActionPreference = "Stop" # Get toolset content -$toolsetJson = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw +$toolset = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw $toolsToInstall = @("Python", "Node", "Boost", "Go") -$tools = ConvertFrom-Json -InputObject $toolsetJson | Select-Object -ExpandProperty toolcache | Where-Object {$ToolsToInstall -contains $_.Name} +$tools = ConvertFrom-Json -InputObject $toolset | Select-Object -ExpandProperty toolcache | Where-Object {$ToolsToInstall -contains $_.Name} foreach ($tool in $tools) { # Get versions manifest for current tool diff --git a/images/linux/scripts/installers/Validate-Toolset.ps1 b/images/linux/scripts/installers/Validate-Toolset.ps1 index 5d20dfcaf..b5eb9a0a5 100644 --- a/images/linux/scripts/installers/Validate-Toolset.ps1 +++ b/images/linux/scripts/installers/Validate-Toolset.ps1 @@ -46,8 +46,8 @@ $toolsExecutables = @{ } # Get toolset content -$toolsetJson = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw -$tools = ConvertFrom-Json -InputObject $toolsetJson | Select-Object -ExpandProperty toolcache +$toolset = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw +$tools = ConvertFrom-Json -InputObject $toolset | Select-Object -ExpandProperty toolcache foreach($tool in $tools) { Invoke-Expression "bash -c `"source $env:HELPER_SCRIPTS/document.sh; DocumentInstalledItem '$($tool.name):'`"" diff --git a/images/linux/scripts/installers/pypy.sh b/images/linux/scripts/installers/pypy.sh index e47235af7..b859eb4e1 100644 --- a/images/linux/scripts/installers/pypy.sh +++ b/images/linux/scripts/installers/pypy.sh @@ -75,8 +75,8 @@ uri="https://downloads.python.org/pypy/" download_with_retries $uri "/tmp" "pypyUrls.html" compressed pypyVersions="$(cat /tmp/pypyUrls.html | grep 'linux64' | awk -v uri="$uri" -F'>|<' '{print uri$5}')" -toolsetJson="$INSTALLER_SCRIPT_FOLDER/toolset.json" -toolsetVersions=$(cat $toolsetJson | jq -r '.toolcache[] | select(.name | contains("PyPy")) | .versions[]') +toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" +toolsetVersions=$(jq -r '.toolcache[] | select(.name | contains("PyPy")) | .versions[]' $toolset) # Fail out if any setups fail set -e From 9e6468a11c8f8a9905119902454b0a482db2c6bb Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev Date: Tue, 8 Sep 2020 23:56:33 +0300 Subject: [PATCH 14/21] test --- images/linux/ubuntu2004.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index 48d309b1e..131bd1f04 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -95,6 +95,7 @@ }, { "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", "scripts":[ "{{template_dir}}/scripts/installers/preparemetadata.sh" ], @@ -103,8 +104,7 @@ "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "ANNOUNCEMENTS={{user `announcements`}}" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" + ] }, { "type": "shell", From cca88753351ba1bafaeed99d91eb5e7f352837a6 Mon Sep 17 00:00:00 2001 From: Image generation service account Date: Wed, 9 Sep 2020 08:16:27 +0000 Subject: [PATCH 15/21] Updating readme file for ubuntu16 version 20200908.1 --- images/linux/Ubuntu1604-README.md | 60 +++++++++++++++++-------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/images/linux/Ubuntu1604-README.md b/images/linux/Ubuntu1604-README.md index aaf93b3d6..a3bc4bd9b 100644 --- a/images/linux/Ubuntu1604-README.md +++ b/images/linux/Ubuntu1604-README.md @@ -1,9 +1,9 @@ # Ubuntu 16.04.7 LTS -The following software is installed on machines with the 20200901.1 update. +The following software is installed on machines with the 20200908.1 update. *** - 7-Zip 9.20 -- Ansible (ansible 2.9.12) +- Ansible (ansible 2.9.13) - AzCopy7 (available by azcopy alias) 7.3.0 - AzCopy10 (available by azcopy10 alias) 10.6.0 - Azure CLI (azure-cli 2.11.1) @@ -66,7 +66,7 @@ The following software is installed on machines with the 20200901.1 update. - yamllint - libcurl3 - Alibaba Cloud CLI (3.0.56) -- AWS CLI (aws-cli/1.18.129 Python/2.7.12 Linux/4.15.0-1092-azure botocore/1.17.52) +- AWS CLI (aws-cli/1.18.134 Python/2.7.12 Linux/4.15.0-1093-azure botocore/1.17.57) - AWS CLI Session manager plugin (1.1.61.0) - build-essential - nvm (0.35.3) @@ -76,10 +76,11 @@ The following software is installed on machines with the 20200901.1 update. - Swift version 5.2.5 (swift-5.2.5-RELEASE) Target: x86_64-unknown-linux-gnu - CMake (cmake version 3.17.0) -- Docker Compose (docker-compose version 1.26.2, build eefe0d31) +- Docker Compose (docker-compose version 1.27.0, build 980ec85b) - Docker-Moby (Docker version 19.03.12+azure, build 0ed913b885c8919944a2e4c8d0b80a318a8dd48b) - Docker-Buildx (0.4.2+azure) - .NET Core SDK: + - 3.1.402 - 3.1.401 - 3.1.302 - 3.1.301 @@ -87,6 +88,7 @@ Target: x86_64-unknown-linux-gnu - 3.1.202 - 3.1.201 - 3.1.200 + - 3.1.108 - 3.1.107 - 3.1.106 - 3.1.105 @@ -99,6 +101,7 @@ Target: x86_64-unknown-linux-gnu - 3.0.102 - 3.0.101 - 3.0.100 + - 2.1.810 - 2.1.809 - 2.1.808 - 2.1.807 @@ -110,6 +113,7 @@ Target: x86_64-unknown-linux-gnu - 2.1.801 - 2.1.701 - 2.1.700 + - 2.1.615 - 2.1.614 - 2.1.613 - 2.1.612 @@ -123,6 +127,7 @@ Target: x86_64-unknown-linux-gnu - 2.1.604 - 2.1.603 - 2.1.602 + - 2.1.518 - 2.1.517 - 2.1.516 - 2.1.515 @@ -147,7 +152,7 @@ Target: x86_64-unknown-linux-gnu - 2.1.301 - 2.1.300 - Erlang (Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 11.0.3) -- Firefox (Mozilla Firefox 80.0) +- Firefox (Mozilla Firefox 80.0.1) - Geckodriver (0.27.0); Gecko Driver is available via GECKOWEBDRIVER environment variable - GNU C++ 7.5.0 - GNU C++ 8.4.0 @@ -155,15 +160,15 @@ Target: x86_64-unknown-linux-gnu - GNU Fortran 8.4.0 - GNU Fortran 9.3.0 - Git (2.28.0) -- Git Large File Storage (LFS) (2.11.0) +- Git Large File Storage (LFS) (2.12.0) - Git-ftp (1.0.2) - Hub CLI (2.14.2) -- GitHub CLI 0.11.1 -- Google Chrome (Google Chrome 85.0.4183.83 ) +- GitHub CLI 0.12.0 +- Google Chrome (Google Chrome 85.0.4183.102 ) - ChromeDriver 85.0.4183.87 (cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689}); Chrome Driver is available via CHROMEWEBDRIVER environment variable -- Google Cloud SDK (307.0.0) -- Haskell Cabal (cabal-install version 3.2.0.0 -compiled using version 3.2.0.0 of the Cabal library ) +- Google Cloud SDK (308.0.0) +- Haskell Cabal (cabal-install version 3.4.0.0 +compiled using version 3.4.0.0 of the Cabal library ) - GHC (The Glorious Glasgow Haskell Compilation System, version 8.10.2) - Haskell Stack (Version 2.3.3, Git revision cb44d51bed48b723a5deb08c3348c0b3ccfc437e x86_64 hpack-0.33.0) - Heroku (heroku/7.42.13 linux-x64 node-v12.16.2) @@ -181,13 +186,13 @@ compiled using version 3.2.0.0 of the Cabal library ) - Kind (kind v0.8.1 go1.14.2 linux/amd64) - kubectl (Client Version: v1.19.0) - helm (v3.3.1+g249e521) -- minikube version: v1.12.3 +- minikube version: v1.13.0 - kustomize ({kustomize/v3.8.2 2020-08-29T17:44:01Z }) - oc CLI Client Version: 4.5.0-202005291417-9933eb9 - Leiningen (Leiningen 2.9.4 on Java 1.8.0_265 OpenJDK 64-Bit Server VM) - Mercurial (Mercurial Distributed SCM (version 4.4.1)) - Miniconda (conda 4.8.3) -- Mono (Mono JIT compiler version 6.10.0.104 (tarball Fri Jun 26 19:43:02 UTC 2020)) +- Mono (Mono JIT compiler version 6.12.0.90 (tarball Fri Sep 4 13:58:50 UTC 2020)) - NuGet (NuGet Version: 5.5.0.6382) - MySQL (mysql Ver 14.14 Distrib 5.7.31, for Linux (x86_64) using EditLine wrapper) - MySQL Server (user:root password:root) @@ -203,8 +208,8 @@ Local version: Unknown) - Webpack (4.44.1) - Webpack CLI (3.3.12) - Yarn (1.22.5) -- Newman (5.1.2) -- Bazel (bazel 3.4.1) +- Newman (5.2.0) +- Bazel (bazel 3.5.0) - Bazelisk (1.6.1) - ORAS CLI 0.8.1 - PhantomJS (2.1.1) @@ -214,7 +219,7 @@ Local version: Unknown) - PHP 7.2 (PHP 7.2.33-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Aug 7 2020 14:43:59) ( NTS )) - PHP 7.3 (PHP 7.3.21-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Aug 7 2020 14:43:42) ( NTS )) - PHP 7.4 (PHP 7.4.9 (cli) (built: Aug 7 2020 14:29:10) ( NTS )) -- Composer (Composer version 1.10.10 2020-08-03 11:35:19) +- Composer (Composer version 1.10.12 2020-09-08 22:58:51) - PHPUnit (PHPUnit 7.5.20 by Sebastian Bergmann and contributors.) - Pollinate - psql (PostgreSQL) 12.4 @@ -240,14 +245,14 @@ Local version: Unknown) - Selenium server standalone (available via SELENIUM_JAR_PATH environment variable) - Sphinx Open Source Search Server - Subversion (svn, version 1.9.3 (r1718519)) -- Terraform (Terraform v0.13.1) +- Terraform (Terraform v0.13.2) - Packer (1.6.2) - Vcpkg 2020.06.15-unknownhash - Vercel CLI (20.1.0) - MongoDB on Linux v4.4.0 - Haveged 1.9.1-3 - Swig 3.0.8 -- Netlify CLI (netlify-cli/2.59.3 linux-x64 node-v12.18.3) +- Netlify CLI (netlify-cli/2.61.2 linux-x64 node-v12.18.3) - Google Repository 58 - Google Play services 49 - Google APIs 24 @@ -321,16 +326,17 @@ Local version: Unknown) - Az Module (3.8.0) - Az Module (4.3.0) - Az Module (4.4.0) +- Az Module (4.6.0) - Cached container images + - jekyll/builder:latest (Digest: sha256:4bc6a3b6eddebef1652ef38ceb965fc9c1b06677f65f764e1e17b88dc2aa9934) + - node:10 (Digest: sha256:304c59f827930ae1a4a9775aec5837c8f95c3d41b5e6d7c0a329b4eb8c4cc8a8) + - node:12 (Digest: sha256:099346a8e9c861b406c9bbb1f109125c7263868e5447cc57d6d564e1fec8a5cf) - buildpack-deps:stretch (Digest: sha256:82a686ba95fdf2bf4a5f5264e8e55b8aa272ffcedaed7826777f08de0d9e1146) - buildpack-deps:buster (Digest: sha256:0f7be4c25fadb2b8aee537cdac00a684b09057e66368683bbf22adf477e05faa) - - node:10 (Digest: sha256:cf3ee6a5a1b1916c7a2e4fb51eb7ecba1afe186739677d62e9c1bb2cb1c7d6b0) - - node:12 (Digest: sha256:d0738468dfc7cedb7d260369e0546fd7ee8731cfd67136f6023d070ad9679090) - debian:9 (Digest: sha256:335ecf9e8d9b2206c2e9e7f8b09547faa9f868e694f7c5be14c38be15ea8a7cf) - debian:8 (Digest: sha256:8a0f2603166345b4d7bbf4842137b2ffcb492ece20d15f963f08aa26670f82c7) - node:12-alpine (Digest: sha256:9623cd396644f9b2e595d833dc0188a880333674488d939338ab5fde10ef7c43) - node:10-alpine (Digest: sha256:2f202af4d6baba655fef9c93f41a914b33ee576b9f55a6e69ba23b49e3b62766) - - jekyll/builder:latest (Digest: sha256:98cda359955f25f18c4bcc78536cdfd30e7ded689b1f52fcd513c75cbe4e751e) - alpine:3.9 (Digest: sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011) - alpine:3.10 (Digest: sha256:f0e9534a598e501320957059cb2a23774b4d4072e37c7b2cf7e95b241f019e35) - alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14) @@ -348,7 +354,7 @@ Local version: Unknown) - pip3 (pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.5)) - Python: - Python 2.7.18 - - Python 3.5.9 + - Python 3.5.10 - Python 3.6.12 - Python 3.7.9 - Python 3.8.5 @@ -364,11 +370,11 @@ Local version: Unknown) - go 1.11.13 - go 1.12.17 - go 1.13.15 - - go 1.14.7 - - go 1.15.0 + - go 1.14.8 + - go 1.15.1 - boost: - boost 1.69.0 - boost 1.72.0 -- AWS SAM CLI, version 1.1.0 -- Homebrew on Linux (Homebrew 2.4.16 -Homebrew/linuxbrew-core (git revision d0486f; last commit 2020-09-01)) +- AWS SAM CLI, version 1.2.0 +- Homebrew on Linux (Homebrew 2.5.0 +Homebrew/linuxbrew-core (git revision 3199c; last commit 2020-09-08)) From f28fb6226a2f4b23f71a5aa8555b9687b6c53f20 Mon Sep 17 00:00:00 2001 From: Image generation service account Date: Wed, 9 Sep 2020 08:19:09 +0000 Subject: [PATCH 16/21] Updating readme file for ubuntu20 version 20200908.1 --- images/linux/Ubuntu2004-README.md | 65 +++++++++++++++++-------------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/images/linux/Ubuntu2004-README.md b/images/linux/Ubuntu2004-README.md index 7a78efab2..82c6085ee 100644 --- a/images/linux/Ubuntu2004-README.md +++ b/images/linux/Ubuntu2004-README.md @@ -1,6 +1,6 @@ # Ubuntu 20.04.1 LTS -The following software is installed on machines with the 20200901.1 update. +The following software is installed on machines with the 20200908.1 update. *** - 7-Zip 16.02 - Ansible (ansible 2.9.6) @@ -65,7 +65,7 @@ The following software is installed on machines with the 20200901.1 update. - yamllint - libcurl4 - Alibaba Cloud CLI (3.0.56) -- AWS CLI (aws-cli/2.0.44 Python/3.7.3 Linux/5.4.0-1022-azure exe/x86_64.ubuntu.20) +- AWS CLI (aws-cli/2.0.46 Python/3.7.3 Linux/5.4.0-1023-azure exe/x86_64.ubuntu.20) - AWS CLI Session manager plugin (1.1.61.0) - build-essential - Clang 6.0 (6.0.1) @@ -74,13 +74,14 @@ The following software is installed on machines with the 20200901.1 update. - Swift version 5.2.5 (swift-5.2.5-RELEASE) Target: x86_64-unknown-linux-gnu - CMake (cmake version 3.17.0) -- Podman (2.0.5) -- Buildah (1.15.1) +- Podman (2.0.6) +- Buildah (1.15.2) - Skopeo (1.1.1) -- Docker Compose (docker-compose version 1.26.2, build eefe0d31) +- Docker Compose (docker-compose version 1.27.0, build 980ec85b) - Docker-Moby (Docker version 19.03.12+azure, build 0ed913b885c8919944a2e4c8d0b80a318a8dd48b) - Docker-Buildx (0.4.2+azure) - .NET Core SDK: + - 3.1.402 - 3.1.401 - 3.1.302 - 3.1.301 @@ -88,6 +89,7 @@ Target: x86_64-unknown-linux-gnu - 3.1.202 - 3.1.201 - 3.1.200 + - 3.1.108 - 3.1.107 - 3.1.106 - 3.1.105 @@ -96,6 +98,7 @@ Target: x86_64-unknown-linux-gnu - 3.1.102 - 3.1.101 - 3.1.100 + - 2.1.810 - 2.1.809 - 2.1.808 - 2.1.807 @@ -107,6 +110,7 @@ Target: x86_64-unknown-linux-gnu - 2.1.801 - 2.1.701 - 2.1.700 + - 2.1.615 - 2.1.614 - 2.1.613 - 2.1.612 @@ -120,6 +124,7 @@ Target: x86_64-unknown-linux-gnu - 2.1.604 - 2.1.603 - 2.1.602 + - 2.1.518 - 2.1.517 - 2.1.516 - 2.1.515 @@ -144,7 +149,7 @@ Target: x86_64-unknown-linux-gnu - 2.1.301 - 2.1.300 - Erlang (Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 11.0.3) -- Firefox (Mozilla Firefox 80.0) +- Firefox (Mozilla Firefox 80.0.1) - Geckodriver (0.27.0); Gecko Driver is available via GECKOWEBDRIVER environment variable - GNU C++ 7.5.0 - GNU C++ 8.4.0 @@ -152,19 +157,19 @@ Target: x86_64-unknown-linux-gnu - GNU Fortran 8.4.0 - GNU Fortran 9.3.0 - Git (2.28.0) -- Git Large File Storage (LFS) (2.11.0) +- Git Large File Storage (LFS) (2.12.0) - Git-ftp (1.6.0) - Hub CLI (2.14.2) -- GitHub CLI 0.11.1 -- Google Chrome (Google Chrome 85.0.4183.83 ) +- GitHub CLI 0.12.0 +- Google Chrome (Google Chrome 85.0.4183.102 ) - ChromeDriver 85.0.4183.87 (cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689}); Chrome Driver is available via CHROMEWEBDRIVER environment variable -- Google Cloud SDK (307.0.0) -- Haskell Cabal (cabal-install version 3.2.0.0 -compiled using version 3.2.0.0 of the Cabal library ) +- Google Cloud SDK (308.0.0) +- Haskell Cabal (cabal-install version 3.4.0.0 +compiled using version 3.4.0.0 of the Cabal library ) - GHC (The Glorious Glasgow Haskell Compilation System, version 8.10.2) - Haskell Stack (Version 2.3.3, Git revision cb44d51bed48b723a5deb08c3348c0b3ccfc437e x86_64 hpack-0.33.0) - Heroku (heroku/7.42.13 linux-x64 node-v12.16.2) -- HHVM (HipHop VM 4.72.0 (rel)) +- HHVM (HipHop VM 4.74.0 (rel)) - ImageMagick - Adopt OpenJDK: - 8 (openjdk version "1.8.0_265") @@ -175,13 +180,13 @@ compiled using version 3.2.0.0 of the Cabal library ) - Kind (kind v0.8.1 go1.14.2 linux/amd64) - kubectl (Client Version: v1.19.0) - helm (v3.3.1+g249e521) -- minikube version: v1.12.3 +- minikube version: v1.13.0 - kustomize ({kustomize/v3.8.2 2020-08-29T17:44:01Z }) - oc CLI Client Version: 4.5.0-202005291417-9933eb9 - Leiningen (Leiningen 2.9.4 on Java 11.0.8 OpenJDK 64-Bit Server VM) - Mercurial (Mercurial Distributed SCM (version 5.3.1)) - Miniconda (conda 4.8.3) -- Mono (Mono JIT compiler version 6.10.0.104 (tarball Fri Jun 26 19:38:44 UTC 2020)) +- Mono (Mono JIT compiler version 6.12.0.90 (tarball Fri Sep 4 14:02:38 UTC 2020)) - NuGet (NuGet Version: 5.5.0.6382) - MySQL (mysql Ver 8.0.21-0ubuntu0.20.04.4 for Linux on x86_64 ((Ubuntu))) - MySQL Server (user:root password:root) @@ -198,8 +203,8 @@ Local version: Unknown) - Webpack (4.44.1) - Webpack CLI (3.3.12) - Yarn (1.22.5) -- Newman (5.1.2) -- Bazel (bazel 3.4.1) +- Newman (5.2.0) +- Bazel (bazel 3.5.0) - Bazelisk (1.6.1) - ORAS CLI 0.8.1 - PhantomJS (2.1.1) @@ -209,7 +214,7 @@ Local version: Unknown) apt-add-repository ppa:ondrej/php -y apt-get update ``` -- Composer (Composer version 1.10.10 2020-08-03 11:35:19) +- Composer (Composer version 1.10.12 2020-09-08 22:58:51) - PHPUnit (PHPUnit 7.5.20 by Sebastian Bergmann and contributors.) - Pollinate - psql (PostgreSQL) 12.4 @@ -236,14 +241,14 @@ apt-get update - Selenium server standalone (available via SELENIUM_JAR_PATH environment variable) - Sphinx Open Source Search Server - Subversion (svn, version 1.13.0 (r1867053)) -- Terraform (Terraform v0.13.1) +- Terraform (Terraform v0.13.2) - Packer (1.6.2) - Vcpkg 2020.06.15-unknownhash - Vercel CLI (20.1.0) - MongoDB on Linux v4.4.0 - Haveged 1.9.1-6ubuntu1 - Swig 4.0.1 -- Netlify CLI (netlify-cli/2.59.3 linux-x64 node-v12.18.3) +- Netlify CLI (netlify-cli/2.61.2 linux-x64 node-v12.18.3) - Google Repository 58 - Google Play services 49 - CMake 3.10.2.4988404 @@ -270,15 +275,15 @@ apt-get update - Android NDK 21.3.6528147 - Az Module (4.6.1) - Cached container images + - jekyll/builder:latest (Digest: sha256:4bc6a3b6eddebef1652ef38ceb965fc9c1b06677f65f764e1e17b88dc2aa9934) + - node:10 (Digest: sha256:304c59f827930ae1a4a9775aec5837c8f95c3d41b5e6d7c0a329b4eb8c4cc8a8) + - node:12 (Digest: sha256:099346a8e9c861b406c9bbb1f109125c7263868e5447cc57d6d564e1fec8a5cf) - buildpack-deps:stretch (Digest: sha256:82a686ba95fdf2bf4a5f5264e8e55b8aa272ffcedaed7826777f08de0d9e1146) - buildpack-deps:buster (Digest: sha256:0f7be4c25fadb2b8aee537cdac00a684b09057e66368683bbf22adf477e05faa) - - node:10 (Digest: sha256:cf3ee6a5a1b1916c7a2e4fb51eb7ecba1afe186739677d62e9c1bb2cb1c7d6b0) - - node:12 (Digest: sha256:d0738468dfc7cedb7d260369e0546fd7ee8731cfd67136f6023d070ad9679090) - debian:9 (Digest: sha256:335ecf9e8d9b2206c2e9e7f8b09547faa9f868e694f7c5be14c38be15ea8a7cf) - debian:8 (Digest: sha256:8a0f2603166345b4d7bbf4842137b2ffcb492ece20d15f963f08aa26670f82c7) - node:12-alpine (Digest: sha256:9623cd396644f9b2e595d833dc0188a880333674488d939338ab5fde10ef7c43) - node:10-alpine (Digest: sha256:2f202af4d6baba655fef9c93f41a914b33ee576b9f55a6e69ba23b49e3b62766) - - jekyll/builder:latest (Digest: sha256:98cda359955f25f18c4bcc78536cdfd30e7ded689b1f52fcd513c75cbe4e751e) - alpine:3.9 (Digest: sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011) - alpine:3.10 (Digest: sha256:f0e9534a598e501320957059cb2a23774b4d4072e37c7b2cf7e95b241f019e35) - alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14) @@ -290,12 +295,12 @@ apt-get update - Ruby 2.6.6 - Ruby 2.7.1 - Python (Python 2.7.18rc1) -- pip (pip 20.2.2 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)) +- pip (pip 20.2.3 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)) - Python3 (Python 3.8.2) - pip3 (pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)) - Python: - Python 2.7.18 - - Python 3.5.9 + - Python 3.5.10 - Python 3.6.12 - Python 3.7.9 - Python 3.8.5 @@ -308,8 +313,8 @@ apt-get update - node 12.18.3 - node 14.9.0 - go: - - go 1.14.7 - - go 1.15.0 -- AWS SAM CLI, version 1.1.0 -- Homebrew on Linux (Homebrew 2.4.16 -Homebrew/linuxbrew-core (git revision d0486f; last commit 2020-09-01)) + - go 1.14.8 + - go 1.15.1 +- AWS SAM CLI, version 1.2.0 +- Homebrew on Linux (Homebrew 2.5.0 +Homebrew/linuxbrew-core (git revision 3199c; last commit 2020-09-08)) From 6e04edd2ad4ac156a5ad903fca480a3cd40d4fcc Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev Date: Wed, 9 Sep 2020 14:38:16 +0300 Subject: [PATCH 17/21] add all the other ubuntu templates --- images/linux/ubuntu1604.json | 4 ++-- images/linux/ubuntu1804.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 3625b7ed2..82cb0f06e 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -90,6 +90,7 @@ }, { "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", "scripts":[ "{{template_dir}}/scripts/installers/preparemetadata.sh" ], @@ -98,8 +99,7 @@ "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "ANNOUNCEMENTS={{user `announcements`}}" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" + ] }, { "type": "shell", diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index b5037520d..e9c756f15 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -93,6 +93,7 @@ }, { "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", "scripts":[ "{{template_dir}}/scripts/installers/preparemetadata.sh" ], @@ -101,8 +102,7 @@ "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "ANNOUNCEMENTS={{user `announcements`}}" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" + ] }, { "type": "shell", From 37aa3f5ade5f4a1b159038f515815ed03fb7bd52 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Wed, 9 Sep 2020 15:42:39 +0300 Subject: [PATCH 18/21] move docker images to the toolset.json --- .../linux/scripts/installers/docker-moby.sh | 38 +++++-------------- images/linux/toolsets/toolset-1604.json | 19 ++++++++++ images/linux/toolsets/toolset-1804.json | 19 ++++++++++ images/linux/toolsets/toolset-2004.json | 19 ++++++++++ 4 files changed, 67 insertions(+), 28 deletions(-) diff --git a/images/linux/scripts/installers/docker-moby.sh b/images/linux/scripts/installers/docker-moby.sh index 0ce51b7ec..6ce336718 100644 --- a/images/linux/scripts/installers/docker-moby.sh +++ b/images/linux/scripts/installers/docker-moby.sh @@ -3,19 +3,20 @@ ## File: docker-moby.sh ## Desc: Installs docker onto the image ################################################################################ +set -e +# Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh source $HELPER_SCRIPTS/os.sh -docker_package=moby - # There is no stable docker-moby for Ubuntu 20 at the moment if isUbuntu20 ; then add-apt-repository "deb [arch=amd64,armhf,arm64] https://packages.microsoft.com/ubuntu/20.04/prod testing main" fi -## Check to see if docker is already installed +# Check to see if docker is already installed +docker_package=moby echo "Determing if Docker ($docker_package) is installed" if ! IsPackageInstalled $docker_package; then echo "Docker ($docker_package) was not found. Installing..." @@ -44,35 +45,17 @@ else echo "Docker-moby and Docker-buildx checking the successfull" # Docker daemon takes time to come up after installing sleep 10 - set -e docker info - set +e fi # Pull images -images=( - node:10 - node:12 - buildpack-deps:stretch - buildpack-deps:buster - node:10-alpine - node:12-alpine - debian:8 - debian:9 - alpine:3.7 - alpine:3.8 - alpine:3.9 - alpine:3.10 - ubuntu:14.04 - docker.io/jekyll/builder - mcr.microsoft.com/azure-pipelines/node8-typescript -) - -for image in "${images[@]}"; do +toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" +images=$(jq -r '.docker.images[]' $toolset) +for image in $images; do docker pull "$image" done -## Add version information to the metadata file +# Add version information to the metadata file echo "Documenting Docker version" docker_version=$(docker -v) DocumentInstalledItem "Docker-Moby ($docker_version)" @@ -81,9 +64,8 @@ echo "Documenting Docker-buildx version" DOCKER_BUILDX_VERSION=$(docker buildx version | cut -d ' ' -f2) DocumentInstalledItem "Docker-Buildx ($DOCKER_BUILDX_VERSION)" -## Add container information to the metadata file +# Add container information to the metadata file DocumentInstalledItem "Cached container images" - while read -r line; do DocumentInstalledItemIndent "$line" -done <<< "$(docker images --digests --format '{{.Repository}}:{{.Tag}} (Digest: {{.Digest}})')" \ No newline at end of file +done <<< "$(docker images --digests --format '{{.Repository}}:{{.Tag}} (Digest: {{.Digest}})')" diff --git a/images/linux/toolsets/toolset-1604.json b/images/linux/toolsets/toolset-1604.json index f03740059..1204f2a86 100644 --- a/images/linux/toolsets/toolset-1604.json +++ b/images/linux/toolsets/toolset-1604.json @@ -170,5 +170,24 @@ "yamllint", "zip" ] + }, + "docker": { + "images": [ + "alpine:3.7", + "alpine:3.8", + "alpine:3.9", + "alpine:3.10", + "buildpack-deps:stretch", + "buildpack-deps:buster", + "debian:8", + "debian:9", + "jekyll/builder", + "mcr.microsoft.com/azure-pipelines/node8-typescript", + "node:10", + "node:12", + "node:10-alpine", + "node:12-alpine", + "ubuntu:14.04" + ] } } diff --git a/images/linux/toolsets/toolset-1804.json b/images/linux/toolsets/toolset-1804.json index f1ea16b56..2c399c8fc 100644 --- a/images/linux/toolsets/toolset-1804.json +++ b/images/linux/toolsets/toolset-1804.json @@ -165,5 +165,24 @@ "yamllint", "zip" ] + }, + "docker": { + "images": [ + "alpine:3.7", + "alpine:3.8", + "alpine:3.9", + "alpine:3.10", + "buildpack-deps:stretch", + "buildpack-deps:buster", + "debian:8", + "debian:9", + "jekyll/builder", + "mcr.microsoft.com/azure-pipelines/node8-typescript", + "node:10", + "node:12", + "node:10-alpine", + "node:12-alpine", + "ubuntu:14.04" + ] } } diff --git a/images/linux/toolsets/toolset-2004.json b/images/linux/toolsets/toolset-2004.json index b4aa7ec41..1162b713f 100644 --- a/images/linux/toolsets/toolset-2004.json +++ b/images/linux/toolsets/toolset-2004.json @@ -129,5 +129,24 @@ "yamllint", "zip" ] + }, + "docker": { + "images": [ + "alpine:3.7", + "alpine:3.8", + "alpine:3.9", + "alpine:3.10", + "buildpack-deps:stretch", + "buildpack-deps:buster", + "debian:8", + "debian:9", + "jekyll/builder", + "mcr.microsoft.com/azure-pipelines/node8-typescript", + "node:10", + "node:12", + "node:10-alpine", + "node:12-alpine", + "ubuntu:14.04" + ] } } From 8c087af706c178dd2817048abf5df17a5723fc65 Mon Sep 17 00:00:00 2001 From: Alexander Sklar Date: Wed, 9 Sep 2020 10:45:40 -0700 Subject: [PATCH 19/21] Update Install-NodeLts.ps1 --- images/win/scripts/Installers/Install-NodeLts.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-NodeLts.ps1 b/images/win/scripts/Installers/Install-NodeLts.ps1 index 518d8f656..8dc4559ed 100644 --- a/images/win/scripts/Installers/Install-NodeLts.ps1 +++ b/images/win/scripts/Installers/Install-NodeLts.ps1 @@ -17,11 +17,11 @@ Choco-Install -PackageName nodejs-lts -ArgumentList "--force" Add-MachinePathItem $PrefixPath $env:Path = Get-MachinePath -setx NPM_CONFIG_PREFIX $PrefixPath /M -$env:NPM_CONFIG_PREFIX = $PrefixPath +setx npm_config_prefix $PrefixPath /M +$env:npm_config_prefix = $PrefixPath -setx NPM_CONFIG_CACHE $CachePath /M -$env:NPM_CONFIG_CACHE = $CachePath +setx npm_config_cache $CachePath /M +$env:npm_config_cache = $CachePath npm config set registry http://registry.npmjs.org/ @@ -35,4 +35,4 @@ npm install -g lerna npm install -g node-sass npm install -g newman -Invoke-PesterTests -TestFile "Node" \ No newline at end of file +Invoke-PesterTests -TestFile "Node" From 128244b89b8532a3604a2ad227eecd05b7a54065 Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Thu, 10 Sep 2020 17:04:24 +0300 Subject: [PATCH 20/21] removed VS buildtools installation --- .../scripts/ImageHelpers/ImageHelpers.psm1 | 3 +- .../scripts/ImageHelpers/InstallHelpers.ps1 | 28 +++++++++ .../ImageHelpers/VisualStudioHelpers.ps1 | 57 +++---------------- images/win/scripts/Installers/Install-VS.ps1 | 25 ++++---- .../SoftwareReport.Generator.ps1 | 7 +-- .../SoftwareReport.VisualStudio.psm1 | 10 ++-- .../scripts/Tests/SSDTExtensions.Tests.ps1 | 4 +- .../win/scripts/Tests/VisualStudio.Tests.ps1 | 18 ++---- images/win/scripts/Tests/WDK.Tests.ps1 | 2 +- images/win/scripts/Tests/Wix.Tests.ps1 | 4 +- images/win/toolsets/toolset-2016.json | 3 - images/win/toolsets/toolset-2019.json | 3 - 12 files changed, 68 insertions(+), 96 deletions(-) diff --git a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 index 07b406621..e150e1a12 100644 --- a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 +++ b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 @@ -35,7 +35,8 @@ Export-ModuleMember -Function @( 'Get-EnvironmentVariable' 'Invoke-PesterTests' 'Get-VsCatalogJsonPath' + 'Get-VisualStudioPath' 'Install-AndroidSDKPackages' - 'Get-VisualStudioProduct' + 'Get-VisualStudioPackages' 'Get-VisualStudioComponents' ) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index 9f1a32f6a..282c03762 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -258,6 +258,34 @@ function Install-VsixExtension } } +function Get-VSExtensionVersion +{ + Param + ( + [Parameter(Mandatory=$true)] + [string] $packageName + ) + + $instanceFolders = Get-ChildItem -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances" + if ($instanceFolders -is [array]) + { + Write-Host "More than one instance installed" + exit 1 + } + + $stateContent = Get-Content -Path (Join-Path $instanceFolders.FullName '\state.packages.json') + $state = $stateContent | ConvertFrom-Json + $packageVersion = ($state.packages | Where-Object { $_.id -eq $packageName }).version + + if (-not $packageVersion) + { + Write-Host "installed package $packageName for Visual Studio 2019 was not found" + exit 1 + } + + return $packageVersion +} + function Get-ToolcachePackages { $toolcachePath = Join-Path $env:ROOT_FOLDER "toolcache.json" diff --git a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 index d9478390f..0fd6bc8b6 100644 --- a/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/VisualStudioHelpers.ps1 @@ -60,60 +60,21 @@ Function Install-VisualStudio } } -function Get-VisualStudioInstancePath { - return "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\" + (Get-VisualStudioProduct -ProductType "VisualStudio").InstanceId -} - function Get-VsCatalogJsonPath { - return Join-Path (Get-VisualStudioInstancePath) "catalog.json" + $instanceFolder = Get-Item "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances\*" | Select-Object -First 1 + return Join-Path $instanceFolder.FullName "catalog.json" } -function Get-VisualStudioProduct { - Param - ( - [Parameter(Mandatory)] - [ValidateSet('VisualStudio','BuildTools')] - [String] $ProductType - ) +function Get-VisualStudioPath { + return (Get-VSSetupInstance | Select-VSSetupInstance -Product *).InstallationPath +} - if ($ProductType -eq "VisualStudio") - { - $VSSelectionType = "*Enterprise*" - } - elseif ($ProductType -eq "BuildTools") - { - $VSSelectionType = "*Build*" - } - return Get-VSSetupInstance | Where-Object -Property DisplayName -like $VSSelectionType +function Get-VisualStudioPackages { + return (Get-VSSetupInstance | Select-VSSetupInstance -Product *).Packages } function Get-VisualStudioComponents { - Param - ( - [Parameter(Mandatory)] - [String] $ProductType - ) - (Get-VisualStudioProduct -ProductType $ProductType).Packages | Where-Object type -in 'Component', 'Workload' | + Get-VisualStudioPackages | Where-Object type -in 'Component', 'Workload' | Sort-Object Id, Version | Select-Object @{n = 'Package'; e = {$_.Id}}, Version | Where-Object { $_.Package -notmatch "[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}" } -} - -function Get-VSExtensionVersion -{ - Param - ( - [Parameter(Mandatory=$true)] - [string] $PackageName - ) - - $state = Get-Content -Path (Join-Path (Get-VisualStudioInstancePath) '\state.packages.json') | ConvertFrom-Json - $packageVersion = ($state.packages | Where-Object { $_.id -eq $PackageName }).version - - if (-not $packageVersion) - { - Write-Host "installed package $PackageName for Visual Studio 2019 was not found" - exit 1 - } - - return $packageVersion -} +} \ No newline at end of file diff --git a/images/win/scripts/Installers/Install-VS.ps1 b/images/win/scripts/Installers/Install-VS.ps1 index be776dded..ed4fca73f 100644 --- a/images/win/scripts/Installers/Install-VS.ps1 +++ b/images/win/scripts/Installers/Install-VS.ps1 @@ -1,35 +1,38 @@ ################################################################################ ## File: Install-VS.ps1 -## Desc: Install Visual Studio and build tools +## Desc: Install Visual Studio ################################################################################ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent $requiredComponents = $toolset.visualStudio.workloads | ForEach-Object { "--add $_" } -$buildToolsRequiredComponents = $toolset.visualStudio.buildtools_workloads | ForEach-Object { "--add $_" } $workLoads = @( "--allWorkloads --includeRecommended" $requiredComponents "--remove Component.CPython3.x64" ) $workLoadsArgument = [String]::Join(" ", $workLoads) -$buildToolsWorkloads= @( - "--includeRecommended" - $buildToolsRequiredComponents -) -$buildWorkLoadsArgument = [String]::Join(" ", $buildToolsWorkloads) $releaseInPath = $toolset.visualStudio.edition $subVersion = $toolset.visualStudio.subversion $bootstrapperUrl = "https://aka.ms/vs/${subVersion}/release/vs_${releaseInPath}.exe" -$buildbootstrapperUrl = "https://aka.ms/vs/${subVersion}/release/vs_buildtools.exe" -# Install VS and VS Build tools +# Install VS Install-VisualStudio -BootstrapperUrl $bootstrapperUrl -WorkLoads $workLoadsArgument -Install-VisualStudio -BootstrapperUrl $buildbootstrapperUrl -WorkLoads $buildWorkLoadsArgument -$vsInstallRoot = (Get-VisualStudioProduct -ProductType "VisualStudio").InstallationPath +# 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]) +{ + Write-Host "More than one instance installed" + exit 1 +} + +$vsInstallRoot = Get-VisualStudioPath # Initialize Visual Studio Experimental Instance & "$vsInstallRoot\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 5ff886c77..eb8b35f0d 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -171,12 +171,7 @@ $markdown += New-MDNewLine $markdown += New-MDHeader "Workloads, components and extensions:" -Level 4 $markdown += New-MDNewLine -$markdown += ((Get-VisualStudioComponents -ProductType "VisualStudio") + (Get-VisualStudioExtensions)) | New-MDTable -$markdown += New-MDNewLine - -$markdown += New-MDHeader "Build Tools Workloads:" -Level 4 -$markdown += New-MDNewLine -$markdown += (Get-VisualStudioComponents -ProductType "BuildTools") | New-MDTable +$markdown += ((Get-VisualStudioComponents) + (Get-VisualStudioExtensions)) | New-MDTable $markdown += New-MDNewLine $markdown += New-MDHeader "Microsoft Visual C++:" -Level 4 diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 index 9427ccc3b..0004c168b 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.VisualStudio.psm1 @@ -23,18 +23,18 @@ function Get-VisualStudioExtensions { # Wix $vs = (Get-VisualStudioVersion).Name.Split()[-1] $wixPackageVersion = Get-WixVersion - $wixExtensionVersion = ((Get-VisualStudioProduct -ProductType "VisualStudio").Packages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version + $wixExtensionVersion = (Get-VisualStudioPackages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version # WDK - $wdkPackageVersion = Get-VSExtensionVersion -PackageName 'Microsoft.Windows.DriverKit' + $wdkPackageVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit' $wdkExtensionVersion = Get-WDKVersion # SSDT - $analysisPackageVersion = Get-VSExtensionVersion -PackageName '04a86fc2-dbd5-4222-848e-911638e487fe' - $reportingPackageVersion = Get-VSExtensionVersion -PackageName '717ad572-c4b7-435c-c166-c2969777f718' + $analysisPackageVersion = Get-VSExtensionVersion -packageName '04a86fc2-dbd5-4222-848e-911638e487fe' + $reportingPackageVersion = Get-VSExtensionVersion -packageName '717ad572-c4b7-435c-c166-c2969777f718' $integrationPackageName = ($vs -match "2019") ? '851E7A09-7B2B-4F06-A15D-BABFCB26B970' : 'D1B09713-C12E-43CC-9EF4-6562298285AB' - $integrationPackageVersion = Get-VSExtensionVersion -PackageName $integrationPackageName + $integrationPackageVersion = Get-VSExtensionVersion -packageName $integrationPackageName $extensions = @( @{Package = 'SSDT Microsoft Analysis Services Projects'; Version = $analysisPackageVersion} diff --git a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 index 5b6031de5..7d1c6ee0b 100644 --- a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 +++ b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 @@ -9,12 +9,12 @@ Describe "SSDTExtensions" { ) It "Extensions id=" -TestCases $testExtenions { - $version = Get-VSExtensionVersion -PackageName "${id}" + $version = Get-VSExtensionVersion -packageName "${id}" $version | Should -Not -BeNullOrEmpty } } else { It "Extension SSDT" { - $version = Get-VSExtensionVersion -PackageName "SSDT" + $version = Get-VSExtensionVersion -packageName "SSDT" $version | Should -Not -BeNullOrEmpty } } diff --git a/images/win/scripts/Tests/VisualStudio.Tests.ps1 b/images/win/scripts/Tests/VisualStudio.Tests.ps1 index 56869cc91..142a9917e 100644 --- a/images/win/scripts/Tests/VisualStudio.Tests.ps1 +++ b/images/win/scripts/Tests/VisualStudio.Tests.ps1 @@ -5,27 +5,17 @@ Describe "Visual Studio" { } It "Devenv.exe" { - $vsInstallRoot = (Get-VisualStudioProduct -ProductType "VisualStudio").InstallationPath + $vsInstallRoot = Get-VisualStudioPath $devenvexePath = "${vsInstallRoot}\Common7\IDE\devenv.exe" $devenvexePath | Should -Exist } } Context "Visual Studio components" { - $testCases = (Get-ToolsetContent).visualStudio.workloads | ForEach-Object { @{ComponentName = $_} } + $expectedComponents = Get-ToolsetContent | Select-Object -ExpandProperty visualStudio | Select-Object -ExpandProperty workloads + $testCases = $expectedComponents | ForEach-Object { @{ComponentName = $_} } BeforeAll { - $installedComponents = Get-VisualStudioComponents -ProductType "VisualStudio" | Select-Object -ExpandProperty Package - } - - It "" -TestCases $testCases { - $installedComponents | Should -Contain $ComponentName - } - } - - Context "Visual Studio Build Tools components" { - $testCases = (Get-ToolsetContent).visualStudio.buildtools_workloads | ForEach-Object { @{ComponentName = $_} } - BeforeAll { - $installedComponents = Get-VisualStudioComponents -ProductType "BuildTools" | Select-Object -ExpandProperty Package + $installedComponents = Get-VisualStudioComponents | Select-Object -ExpandProperty Package } It "" -TestCases $testCases { diff --git a/images/win/scripts/Tests/WDK.Tests.ps1 b/images/win/scripts/Tests/WDK.Tests.ps1 index 0f8e76770..c67586e79 100644 --- a/images/win/scripts/Tests/WDK.Tests.ps1 +++ b/images/win/scripts/Tests/WDK.Tests.ps1 @@ -5,7 +5,7 @@ Describe "WDK" { } It "WDK version from system" { - $version = Get-VSExtensionVersion -PackageName "Microsoft.Windows.DriverKit" + $version = Get-VSExtensionVersion -packageName "Microsoft.Windows.DriverKit" $version | Should -Not -BeNullOrEmpty } } diff --git a/images/win/scripts/Tests/Wix.Tests.ps1 b/images/win/scripts/Tests/Wix.Tests.ps1 index bd22bef36..2a12261e2 100644 --- a/images/win/scripts/Tests/Wix.Tests.ps1 +++ b/images/win/scripts/Tests/Wix.Tests.ps1 @@ -12,11 +12,11 @@ Describe "Wix" { It "Wix Toolset version from system" { if (Test-IsWin19) { - $exVersion = Get-VSExtensionVersion -PackageName "WixToolset.VisualStudioExtension.Dev16" + $exVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev16" } else { - $exVersion = Get-VSExtensionVersion -PackageName "WixToolset.VisualStudioExtension.Dev15" + $exVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev15" } $exVersion | Should -Not -BeNullOrEmpty } diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index c292c7af9..a76246e60 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -227,9 +227,6 @@ "Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre", "Microsoft.VisualStudio.Component.Workflow", "Microsoft.VisualStudio.Workload.Office" - ], - "buildtools_workloads": [ - "Microsoft.VisualStudio.Workload.WebBuildTools" ] } } diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index db7919f9a..a2a7ec4a5 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -259,9 +259,6 @@ "Microsoft.VisualStudio.Workload.VisualStudioExtension", "Component.MDD.Linux", "Component.MDD.Linux.GCC.arm" - ], - "buildtools_workloads": [ - "Microsoft.VisualStudio.Workload.WebBuildTools" ] } } From a963caf625d56a4ec140aad03de2b46f3bb2ae4a Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Fri, 11 Sep 2020 08:58:54 +0300 Subject: [PATCH 21/21] cobertura jars link changed --- images/win/scripts/Installers/Install-JavaTools.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-JavaTools.ps1 b/images/win/scripts/Installers/Install-JavaTools.ps1 index 759d132fc..04a56a914 100644 --- a/images/win/scripts/Installers/Install-JavaTools.ps1 +++ b/images/win/scripts/Installers/Install-JavaTools.ps1 @@ -119,7 +119,7 @@ setx M2_REPO $m2_repo /M setx MAVEN_OPTS $maven_opts /M # Download cobertura jars -$uri = 'https://ayera.dl.sourceforge.net/project/cobertura/cobertura/2.1.1/cobertura-2.1.1-bin.zip' +$uri = 'https://downloads.sourceforge.net/project/cobertura/cobertura/2.1.1/cobertura-2.1.1-bin.zip' $coberturaPath = "C:\cobertura-2.1.1" $archivePath = Start-DownloadWithRetry -Url $uri -Name "cobertura.zip"