From ece0348c18ecf9d0e0650a6c0c930e63fccc5238 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Mon, 7 Sep 2020 17:05:11 +0400 Subject: [PATCH 01/26] InstallerProjets scripts have been added --- .../Windows2019/Install-InstallerProjects.ps1 | 11 +++++++++++ images/win/scripts/Tests/InstallerProjects.Tests.ps1 | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 create mode 100644 images/win/scripts/Tests/InstallerProjects.Tests.ps1 diff --git a/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 b/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 new file mode 100644 index 00000000..5c4628d5 --- /dev/null +++ b/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 @@ -0,0 +1,11 @@ +################################################################################ +## File: Install-InstallerProjects.ps1 +## Desc: Install the InstallerProjects Visual Studio Extension +################################################################################ + +Import-Module -Name ImageHelpers -Force + +$InstallerProjectsUrl = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/0.9.8/vspackage' +Install-VsixExtension -Url $InstallerProjectsUrl -name "InstallerProjects.vsix" -VSversion "2019" + +Invoke-PesterTests -TestFile "InstallerProjects" \ No newline at end of file diff --git a/images/win/scripts/Tests/InstallerProjects.Tests.ps1 b/images/win/scripts/Tests/InstallerProjects.Tests.ps1 new file mode 100644 index 00000000..4552cd34 --- /dev/null +++ b/images/win/scripts/Tests/InstallerProjects.Tests.ps1 @@ -0,0 +1,7 @@ +Import-Module -Name VsSetup -Force +Describe "InstallProjects" { + It "InstallProjects exists" { + $InstallProjects = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages | Where-Object {$_.id -eq 'VSInstallerProjects' } + $InstallProjects | Should -Not -BeNullOrEmpty + } +} \ No newline at end of file From 86faddeb95538d29bfe7f3b7f1b968ce88cbc6b1 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Tue, 8 Sep 2020 11:01:42 +0400 Subject: [PATCH 02/26] Installer project URL has been corrected --- .../Installers/Windows2019/Install-InstallerProjects.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 b/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 index 5c4628d5..b4871038 100644 --- a/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 +++ b/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 @@ -5,7 +5,7 @@ Import-Module -Name ImageHelpers -Force -$InstallerProjectsUrl = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/0.9.8/vspackage' +$InstallerProjectsUrl = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage' Install-VsixExtension -Url $InstallerProjectsUrl -name "InstallerProjects.vsix" -VSversion "2019" Invoke-PesterTests -TestFile "InstallerProjects" \ No newline at end of file From 40333f6adf0aefc6c82101f192325492811956c7 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Wed, 9 Sep 2020 08:55:15 +0400 Subject: [PATCH 03/26] Install-Vsix.ps1 has been created --- images/win/Windows2019-Azure.json | 2 +- .../win/scripts/Installers/Install-Vsix.ps1 | 21 +++++++++++++++++++ images/win/toolsets/toolset-2019.json | 18 ++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 images/win/scripts/Installers/Install-Vsix.ps1 diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index b66d64c5..76412fd8 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -92,7 +92,7 @@ { "type": "file", "source": "{{template_dir}}/toolsets/toolset-2019.json", - "destination": "{{user `toolset_json_path`}}" + "destination": "{{user `tonolset_jso_path`}}" }, { "type": "windows-shell", diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 new file mode 100644 index 00000000..3524fa7d --- /dev/null +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -0,0 +1,21 @@ +################################################################################### +## File: Install-Vsix.ps1 +## Desc: Install the Visual Studio Extensions from toolset.json +################################################################################### + +Import-Module -Name ImageHelpers -Force +$ErrorActionPreference = "Stop" + +$toolset = Get-ToolsetContent +$requiredVsixs = $toolset.visualStudio.vsix + +if (Test-IsWin19) { + $VsVersion = '2019' +} +else { + $VsVersion = '2017' +} + +$requiredVsixs | ForEach-Object { + Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion +} \ No newline at end of file diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index a2a7ec4a..040a09fe 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -259,6 +259,24 @@ "Microsoft.VisualStudio.Workload.VisualStudioExtension", "Component.MDD.Linux", "Component.MDD.Linux.GCC.arm" + ], + "vsix": [ + { + "name": "Microsoft.DataTools.AnalysisServices.vsix", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/latest/vspackage" + }, + { + "name": "Microsoft.DataTools.IntegrationServices.exe", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/latest/vspackage" + }, + { + "name": "Microsoft.DataTools.ReportingServices.vsix", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/latest/vspackage" + }, + { + "name": "Microsoft.VisualStudio.Installer.Projects.vsix", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage" + } ] } } From feaef58222d3c2bac15ab6953cd06b1e05073175 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 12:42:29 +0400 Subject: [PATCH 04/26] Vsix Tests have been created. Old files have been removed --- .../win/scripts/Installers/Install-Vsix.ps1 | 4 +++- .../Windows2019/Install-InstallerProjects.ps1 | 11 ---------- .../Windows2019/Install-SSDTExtensions.ps1 | 12 ----------- .../scripts/Tests/InstallerProjects.Tests.ps1 | 7 ------- .../scripts/Tests/SSDTExtensions.Tests.ps1 | 21 ------------------- images/win/scripts/Tests/Vsix.Tests.ps1 | 12 +++++++++++ images/win/toolsets/toolset-2019.json | 12 +++++++---- 7 files changed, 23 insertions(+), 56 deletions(-) delete mode 100644 images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 delete mode 100644 images/win/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1 delete mode 100644 images/win/scripts/Tests/InstallerProjects.Tests.ps1 delete mode 100644 images/win/scripts/Tests/SSDTExtensions.Tests.ps1 create mode 100644 images/win/scripts/Tests/Vsix.Tests.ps1 diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 3524fa7d..9c913196 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -18,4 +18,6 @@ else { $requiredVsixs | ForEach-Object { Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion -} \ No newline at end of file +} + +Invoke-PesterTests -TestFile "Vsix" \ No newline at end of file diff --git a/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 b/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 deleted file mode 100644 index b4871038..00000000 --- a/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -################################################################################ -## File: Install-InstallerProjects.ps1 -## Desc: Install the InstallerProjects Visual Studio Extension -################################################################################ - -Import-Module -Name ImageHelpers -Force - -$InstallerProjectsUrl = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage' -Install-VsixExtension -Url $InstallerProjectsUrl -name "InstallerProjects.vsix" -VSversion "2019" - -Invoke-PesterTests -TestFile "InstallerProjects" \ No newline at end of file diff --git a/images/win/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1 b/images/win/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1 deleted file mode 100644 index f678ab54..00000000 --- a/images/win/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -################################################################################### -## File: Install-SSDTExtensions.ps1 -## Desc: Install the extensions previously known as SSDT package -################################################################################### - -Import-Module -Name ImageHelpers -Force - -Install-VsixExtension -Url 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/2.9.5/vspackage' -Name 'Microsoft.DataTools.AnalysisServices.vsix' -VSversion "2019" -Install-VsixExtension -Url 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/3.4/vspackage' -Name 'Microsoft.DataTools.IntegrationServices.exe' -VSversion "2019" -Install-VsixExtension -Url 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/2.6.3/vspackage' -Name 'Microsoft.DataTools.ReportingServices.vsix' -VSversion "2019" - -Invoke-PesterTests -TestFile "SSDTExtensions" diff --git a/images/win/scripts/Tests/InstallerProjects.Tests.ps1 b/images/win/scripts/Tests/InstallerProjects.Tests.ps1 deleted file mode 100644 index 4552cd34..00000000 --- a/images/win/scripts/Tests/InstallerProjects.Tests.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -Import-Module -Name VsSetup -Force -Describe "InstallProjects" { - It "InstallProjects exists" { - $InstallProjects = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages | Where-Object {$_.id -eq 'VSInstallerProjects' } - $InstallProjects | Should -Not -BeNullOrEmpty - } -} \ No newline at end of file diff --git a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 deleted file mode 100644 index 7d1c6ee0..00000000 --- a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -Describe "SSDTExtensions" { -#These extensions don't have any proper name in the state.packages.json file, only id is available, which can be found on extension marketplace download page - - if (Test-isWin19) { - $testExtenions = @( - @{id = "04a86fc2-dbd5-4222-848e-911638e487fe"} - @{id = "851E7A09-7B2B-4F06-A15D-BABFCB26B970"} - @{id = "717ad572-c4b7-435c-c166-c2969777f718"} - ) - - It "Extensions id=" -TestCases $testExtenions { - $version = Get-VSExtensionVersion -packageName "${id}" - $version | Should -Not -BeNullOrEmpty - } - } else { - It "Extension SSDT" { - $version = Get-VSExtensionVersion -packageName "SSDT" - $version | Should -Not -BeNullOrEmpty - } - } -} diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 new file mode 100644 index 00000000..c10f5571 --- /dev/null +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -0,0 +1,12 @@ +Describe "VsixTests" { + $toolset = Get-ToolsetContent + $requiredVsixs = $toolset.visualStudio.vsix + + $allPackages = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages + $testCases = $requiredVsixs | ForEach-Object { @{ VsixId = $_.Id; AllPackages = $allPackages }} + + It "" -TestCases $testCases { + $objVsix = $AllPackages | Where-Object {$_.id -eq $VsixId } | Select-Object Id, Version + $objVsix | Should -Not -BeNullOrEmpty + } +} \ No newline at end of file diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 040a09fe..5e41bd2b 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -263,19 +263,23 @@ "vsix": [ { "name": "Microsoft.DataTools.AnalysisServices.vsix", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/latest/vspackage" + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/latest/vspackage", + "id": "04a86fc2-dbd5-4222-848e-911638e487fe" }, { "name": "Microsoft.DataTools.IntegrationServices.exe", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/latest/vspackage" + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/latest/vspackage", + "id": "851E7A09-7B2B-4F06-A15D-BABFCB26B970" }, { "name": "Microsoft.DataTools.ReportingServices.vsix", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/latest/vspackage" + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/latest/vspackage", + "id": "717ad572-c4b7-435c-c166-c2969777f718" }, { "name": "Microsoft.VisualStudio.Installer.Projects.vsix", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage" + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage", + "id": "VSInstallerProjects" } ] } From ffc68fcc474d499a9b6dc476613749f379be4764 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 13:04:58 +0400 Subject: [PATCH 05/26] Small bug fixing in json file --- images/win/Windows2019-Azure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 76412fd8..f9c54a43 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -92,7 +92,7 @@ { "type": "file", "source": "{{template_dir}}/toolsets/toolset-2019.json", - "destination": "{{user `tonolset_jso_path`}}" + "destination": "{{user `toolset_jso_path`}}" }, { "type": "windows-shell", From d56d5a4b0668eb916326e5d15fff6b462f38c269 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 13:08:26 +0400 Subject: [PATCH 06/26] Windows2019-Azure.json has been reverted from main branch --- images/win/Windows2019-Azure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index f9c54a43..b66d64c5 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -92,7 +92,7 @@ { "type": "file", "source": "{{template_dir}}/toolsets/toolset-2019.json", - "destination": "{{user `toolset_jso_path`}}" + "destination": "{{user `toolset_json_path`}}" }, { "type": "windows-shell", From 10252c3fc3c4a4aa2ad26c86676f9f3d380f6537 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 13:25:22 +0400 Subject: [PATCH 07/26] Checking the VSIX has been added --- images/win/scripts/Installers/Install-Vsix.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 9c913196..e36a7b4d 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -8,6 +8,10 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent $requiredVsixs = $toolset.visualStudio.vsix +if(-not $requiredVsixs) { + Write-Host "No requiered VSIX" + exit 1 +} if (Test-IsWin19) { $VsVersion = '2019' From fd7f9cc9fddf90769a43ed336749cc8445bc7b8d Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 13:38:58 +0400 Subject: [PATCH 08/26] exit 1 -> exit 0 --- images/win/scripts/Installers/Install-Vsix.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index e36a7b4d..9cd148ce 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -10,7 +10,7 @@ $toolset = Get-ToolsetContent $requiredVsixs = $toolset.visualStudio.vsix if(-not $requiredVsixs) { Write-Host "No requiered VSIX" - exit 1 + exit 0 } if (Test-IsWin19) { From 0bf0a04ef612b874be0a692c6918209bd1018e7c Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 14:05:55 +0400 Subject: [PATCH 09/26] Empty VSIX array has been added --- images/win/toolsets/toolset-2016.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index a76246e6..c764e080 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -227,6 +227,8 @@ "Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre", "Microsoft.VisualStudio.Component.Workflow", "Microsoft.VisualStudio.Workload.Office" + ], + "vsix": [ ] } } From 00b1f4c3c903602d9ce9388c057f0c2a084b6ca8 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 14:11:15 +0400 Subject: [PATCH 10/26] Import-Module has been removed --- images/win/scripts/Installers/Install-Vsix.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 9cd148ce..6d43516c 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -3,7 +3,6 @@ ## Desc: Install the Visual Studio Extensions from toolset.json ################################################################################### -Import-Module -Name ImageHelpers -Force $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent From 5587930568a5408473ca8381c7bb7f1e9e697f46 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 14:43:21 +0400 Subject: [PATCH 11/26] $VsVersion now is got from toolset --- images/win/scripts/Installers/Install-Vsix.ps1 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 6d43516c..af710dd9 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -12,13 +12,7 @@ if(-not $requiredVsixs) { exit 0 } -if (Test-IsWin19) { - $VsVersion = '2019' -} -else { - $VsVersion = '2017' -} - +$VsVersion = $toolset.visualStudio.Version $requiredVsixs | ForEach-Object { Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion } From 29362bcc5c5d2e26477c759c1df2fd7eb1c91f50 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 14:47:36 +0400 Subject: [PATCH 12/26] nitpick - message has been changed --- images/win/scripts/Installers/Install-Vsix.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index af710dd9..664ced94 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -8,7 +8,7 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent $requiredVsixs = $toolset.visualStudio.vsix if(-not $requiredVsixs) { - Write-Host "No requiered VSIX" + Write-Host "No requiered VSIX extensions" exit 0 } From daed7d9fc5368b42d9f57be5fe4e10ddb5e51659 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 15:00:12 +0400 Subject: [PATCH 13/26] hardcoded vesrions has been reverted --- images/win/toolsets/toolset-2019.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 5e41bd2b..7184dc03 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -263,17 +263,17 @@ "vsix": [ { "name": "Microsoft.DataTools.AnalysisServices.vsix", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/latest/vspackage", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/2.9.5/vspackage", "id": "04a86fc2-dbd5-4222-848e-911638e487fe" }, { "name": "Microsoft.DataTools.IntegrationServices.exe", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/latest/vspackage", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/3.4/vspackage", "id": "851E7A09-7B2B-4F06-A15D-BABFCB26B970" }, { "name": "Microsoft.DataTools.ReportingServices.vsix", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/latest/vspackage", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/2.6.3/vspackage", "id": "717ad572-c4b7-435c-c166-c2969777f718" }, { From c6e7cc46fa0dbca372e4c2e21df2de5ab2c83da6 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 15:05:02 +0400 Subject: [PATCH 14/26] Windows templates have been modified --- images/win/Windows2016-Azure.json | 3 ++- images/win/Windows2019-Azure.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index bb871b3c..7a3b7633 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -185,7 +185,8 @@ "scripts":[ "{{ template_dir }}/scripts/Installers/Install-Nuget.ps1", "{{ template_dir }}/scripts/Installers/Install-Wix.ps1", - "{{ template_dir }}/scripts/Installers/Install-WDK.ps1" + "{{ template_dir }}/scripts/Installers/Install-WDK.ps1", + "{{ template_dir }}/scripts/Installers/Install-Vsix.ps1" ] }, { diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index b66d64c5..2d58ce23 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -192,8 +192,8 @@ "scripts":[ "{{ template_dir }}/scripts/Installers/Install-Nuget.ps1", "{{ template_dir }}/scripts/Installers/Install-Wix.ps1", - "{{ template_dir }}/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1", "{{ template_dir }}/scripts/Installers/Install-WDK.ps1", + "{{ template_dir }}/scripts/Installers/Install-Vsix.ps1", "{{ template_dir }}/scripts/Installers/Install-AzureCli.ps1", "{{ template_dir }}/scripts/Installers/Install-AzureDevOpsCli.ps1", "{{ template_dir }}/scripts/Installers/Install-AzCopy.ps1", From 8169d5efd40dd727e2fab8fdd591af91f0577430 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 15:06:03 +0400 Subject: [PATCH 15/26] VsixTests -> Vsix --- images/win/scripts/Tests/Vsix.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 index c10f5571..478188f7 100644 --- a/images/win/scripts/Tests/Vsix.Tests.ps1 +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -1,4 +1,4 @@ -Describe "VsixTests" { +Describe "Vsix" { $toolset = Get-ToolsetContent $requiredVsixs = $toolset.visualStudio.vsix From 0c146bf19bc17de174cb23593575d8a823e19a99 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 15:07:47 +0400 Subject: [PATCH 16/26] Test name has been changed to "VSIX Extension " --- images/win/scripts/Tests/Vsix.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 index 478188f7..6d6ca22c 100644 --- a/images/win/scripts/Tests/Vsix.Tests.ps1 +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -5,7 +5,7 @@ Describe "Vsix" { $allPackages = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages $testCases = $requiredVsixs | ForEach-Object { @{ VsixId = $_.Id; AllPackages = $allPackages }} - It "" -TestCases $testCases { + It "VSIX Extension " -TestCases $testCases { $objVsix = $AllPackages | Where-Object {$_.id -eq $VsixId } | Select-Object Id, Version $objVsix | Should -Not -BeNullOrEmpty } From ed1663db186daf145da10b7f1055fb8b50160e83 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 16:19:27 +0400 Subject: [PATCH 17/26] minor fixing in Install-Vsix.ps1 --- images/win/scripts/Installers/Install-Vsix.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 664ced94..ec955b4e 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -6,14 +6,14 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent -$requiredVsixs = $toolset.visualStudio.vsix -if(-not $requiredVsixs) { - Write-Host "No requiered VSIX extensions" +$vsixPackagesList = $toolset.visualStudio.vsix +if(-not $vsixPackagesList) { + Write-Host "No extensions to install" exit 0 } $VsVersion = $toolset.visualStudio.Version -$requiredVsixs | ForEach-Object { +$vsixPackagesList | ForEach-Object { Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion } From 493aec5cabe7689c0d4c548eacc11481c0f87825 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 19:10:05 +0400 Subject: [PATCH 18/26] minor bugfixing --- images/win/scripts/Installers/Install-Vsix.ps1 | 2 +- images/win/scripts/Tests/Vsix.Tests.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index ec955b4e..e8bfbb05 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -7,7 +7,7 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent $vsixPackagesList = $toolset.visualStudio.vsix -if(-not $vsixPackagesList) { +if (-not $vsixPackagesList) { Write-Host "No extensions to install" exit 0 } diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 index 6d6ca22c..19edf15a 100644 --- a/images/win/scripts/Tests/Vsix.Tests.ps1 +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -6,7 +6,7 @@ Describe "Vsix" { $testCases = $requiredVsixs | ForEach-Object { @{ VsixId = $_.Id; AllPackages = $allPackages }} It "VSIX Extension " -TestCases $testCases { - $objVsix = $AllPackages | Where-Object {$_.id -eq $VsixId } | Select-Object Id, Version + $objVsix = $AllPackages | Where-Object { $_.id -eq $VsixId } $objVsix | Should -Not -BeNullOrEmpty } } \ No newline at end of file From cbb93facbc0c9cccfae806654f5cdc316ec36f6c Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 19:20:28 +0400 Subject: [PATCH 19/26] nitpic --- images/win/scripts/Installers/Install-Vsix.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index e8bfbb05..fbbc7d1b 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -6,14 +6,14 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent -$vsixPackagesList = $toolset.visualStudio.vsix -if (-not $vsixPackagesList) { +$VsixPackagesList = $toolset.visualStudio.vsix +if (-not $VsixPackagesList) { Write-Host "No extensions to install" exit 0 } $VsVersion = $toolset.visualStudio.Version -$vsixPackagesList | ForEach-Object { +$VsixPackagesList | ForEach-Object { Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion } From 63fe681d98384821d374b3423b505e7f747fed86 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 19:40:28 +0400 Subject: [PATCH 20/26] Case has been fixed --- images/win/scripts/Installers/Install-Vsix.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index fbbc7d1b..4e6062a2 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -6,15 +6,15 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent -$VsixPackagesList = $toolset.visualStudio.vsix -if (-not $VsixPackagesList) { +$vsixPackagesList = $toolset.visualStudio.vsix +if (-not $vsixPackagesList) { Write-Host "No extensions to install" exit 0 } -$VsVersion = $toolset.visualStudio.Version -$VsixPackagesList | ForEach-Object { - Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion +$vsVersion = $toolset.visualStudio.Version +$vsixPackagesList | ForEach-Object { + Install-VsixExtension -Url $_.url -Name $_.name -VSversion $vsVersion } Invoke-PesterTests -TestFile "Vsix" \ No newline at end of file From a52de89923ba2f199b26cc4f13e7ce41188e1b0c Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 19:55:05 +0400 Subject: [PATCH 21/26] SSDTExtensions.Tests.ps1 has been removed --- .../scripts/Tests/SSDTExtensions.Tests.ps1 | 21 ------------------- 1 file changed, 21 deletions(-) delete mode 100644 images/win/scripts/Tests/SSDTExtensions.Tests.ps1 diff --git a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 deleted file mode 100644 index 7d1c6ee0..00000000 --- a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -Describe "SSDTExtensions" { -#These extensions don't have any proper name in the state.packages.json file, only id is available, which can be found on extension marketplace download page - - if (Test-isWin19) { - $testExtenions = @( - @{id = "04a86fc2-dbd5-4222-848e-911638e487fe"} - @{id = "851E7A09-7B2B-4F06-A15D-BABFCB26B970"} - @{id = "717ad572-c4b7-435c-c166-c2969777f718"} - ) - - It "Extensions id=" -TestCases $testExtenions { - $version = Get-VSExtensionVersion -packageName "${id}" - $version | Should -Not -BeNullOrEmpty - } - } else { - It "Extension SSDT" { - $version = Get-VSExtensionVersion -packageName "SSDT" - $version | Should -Not -BeNullOrEmpty - } - } -} From d1ae794365db8871fae4743e20a6a364cf4ff0c8 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 20:14:21 +0400 Subject: [PATCH 22/26] minor fix in Vsix.Tests --- images/win/scripts/Tests/Vsix.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 index 19edf15a..1539601b 100644 --- a/images/win/scripts/Tests/Vsix.Tests.ps1 +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -5,7 +5,7 @@ Describe "Vsix" { $allPackages = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages $testCases = $requiredVsixs | ForEach-Object { @{ VsixId = $_.Id; AllPackages = $allPackages }} - It "VSIX Extension " -TestCases $testCases { + It "Extension " -TestCases $testCases { $objVsix = $AllPackages | Where-Object { $_.id -eq $VsixId } $objVsix | Should -Not -BeNullOrEmpty } From c8633ce4c48e0e5bbd42423ce1e3447010c3bda3 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Mon, 14 Sep 2020 12:31:15 +0400 Subject: [PATCH 23/26] SSDTExtensions.Tests.ps1 has been reverted --- .../scripts/Tests/SSDTExtensions.Tests.ps1 | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 images/win/scripts/Tests/SSDTExtensions.Tests.ps1 diff --git a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 new file mode 100644 index 00000000..7d1c6ee0 --- /dev/null +++ b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 @@ -0,0 +1,21 @@ +Describe "SSDTExtensions" { +#These extensions don't have any proper name in the state.packages.json file, only id is available, which can be found on extension marketplace download page + + if (Test-isWin19) { + $testExtenions = @( + @{id = "04a86fc2-dbd5-4222-848e-911638e487fe"} + @{id = "851E7A09-7B2B-4F06-A15D-BABFCB26B970"} + @{id = "717ad572-c4b7-435c-c166-c2969777f718"} + ) + + It "Extensions id=" -TestCases $testExtenions { + $version = Get-VSExtensionVersion -packageName "${id}" + $version | Should -Not -BeNullOrEmpty + } + } else { + It "Extension SSDT" { + $version = Get-VSExtensionVersion -packageName "SSDT" + $version | Should -Not -BeNullOrEmpty + } + } +} From 1df53d8a67ae7c39e495401d7fc6bb9a81bcba73 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Mon, 14 Sep 2020 15:33:51 +0400 Subject: [PATCH 24/26] "buildtools_workloads" section has been removed --- images/win/toolsets/toolset-2016.json | 3 --- images/win/toolsets/toolset-2019.json | 3 --- 2 files changed, 6 deletions(-) diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index d9e1ca47..c764e080 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -229,9 +229,6 @@ "Microsoft.VisualStudio.Workload.Office" ], "vsix": [ - ], - "buildtools_workloads": [ - "Microsoft.VisualStudio.Workload.WebBuildTools" ] } } diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 45fd78ea..7184dc03 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -281,9 +281,6 @@ "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage", "id": "VSInstallerProjects" } - ], - "buildtools_workloads": [ - "Microsoft.VisualStudio.Workload.WebBuildTools" ] } } From 8a03bd9376c8c78f7ae96005acc5b26ae09460a5 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Tue, 15 Sep 2020 12:22:05 +0400 Subject: [PATCH 25/26] toolset_json_path has been added to section with Install-Vsix --- images/win/Windows2016-Azure.json | 3 +++ images/win/Windows2019-Azure.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 7a3b7633..6aa1423c 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -182,6 +182,9 @@ }, { "type": "powershell", + "environment_vars":[ + "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" + ], "scripts":[ "{{ template_dir }}/scripts/Installers/Install-Nuget.ps1", "{{ template_dir }}/scripts/Installers/Install-Wix.ps1", diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 2d58ce23..515caba9 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -189,6 +189,9 @@ }, { "type": "powershell", + "environment_vars":[ + "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" + ], "scripts":[ "{{ template_dir }}/scripts/Installers/Install-Nuget.ps1", "{{ template_dir }}/scripts/Installers/Install-Wix.ps1", From f0f5024ec9c84605ce8d7fc10328433527daf8a8 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Wed, 16 Sep 2020 19:16:22 +0400 Subject: [PATCH 26/26] Vsix.Tests.ps1 - condition has been added --- images/win/scripts/Tests/Vsix.Tests.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 index 1539601b..b92f862e 100644 --- a/images/win/scripts/Tests/Vsix.Tests.ps1 +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -4,9 +4,10 @@ Describe "Vsix" { $allPackages = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages $testCases = $requiredVsixs | ForEach-Object { @{ VsixId = $_.Id; AllPackages = $allPackages }} - - It "Extension " -TestCases $testCases { - $objVsix = $AllPackages | Where-Object { $_.id -eq $VsixId } - $objVsix | Should -Not -BeNullOrEmpty + if ($testCases.Count -gt 0) { + It "Extension " -TestCases $testCases { + $objVsix = $AllPackages | Where-Object { $_.id -eq $VsixId } + $objVsix | Should -Not -BeNullOrEmpty + } } } \ No newline at end of file