Refactor MSI CI (#14753)

This commit is contained in:
Travis Plunk 2021-02-12 15:07:42 -08:00 committed by GitHub
parent ac560d8d32
commit d7370cfa44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 43 additions and 40 deletions

View file

@ -8,14 +8,17 @@ trigger:
- release*
- feature*
paths:
include:
- /.vsts-ci/templates/windows-packaging.yml
- /.vsts-ci/windows-packaging.yml
- /global.json
- /src/*
- /tools/ci.psm1
- /tools/packaging/*
- /assets/*
exclude:
- tests/*
- docs/*
- demos/*
- CHANGELOG/*
- .devcontainer/*
- .github/*
- .poshchan/*
- .vscode/*
- code-server/*
- docker/*
pr:
branches:
@ -27,29 +30,29 @@ pr:
# file extension filters are not supported when this was written.
# This really should be /src/**/*.csproj
include:
- /.vsts-ci/templates/windows-packaging.yml
- /.vsts-ci/windows-packaging.yml
- /global.json
- /src/Microsoft.Management.Infrastructure.CimCmdlets/Microsoft.Management.Infrastructure.CimCmdlets.csproj
- /src/Microsoft.Management.UI.Internal/Microsoft.PowerShell.GraphicalHost.csproj
- /src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj
- /src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
- /src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
- /src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj
- /src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
- /src/Microsoft.PowerShell.GlobalTool.Shim/Microsoft.PowerShell.GlobalTool.Shim.csproj
- /src/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.csproj
- /src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj
- /src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
- /src/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.csproj
- /src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
- /src/Microsoft.WSMan.Runtime/Microsoft.WSMan.Runtime.csproj
- /src/Modules/PSGalleryModules.csproj
- /src/powershell-win-core/powershell-win-core.csproj
- /tools/ci.psm1
- /tools/packaging/*
- /assets/files.wxs
- /assets/Product.wxs
- .vsts-ci/windows/*
- assets/wix/*
- build.psm1
- global.json
- nuget.config
- PowerShell.Common.props
- src/Microsoft.Management.Infrastructure.CimCmdlets/Microsoft.Management.Infrastructure.CimCmdlets.csproj
- src/Microsoft.Management.UI.Internal/Microsoft.PowerShell.GraphicalHost.csproj
- src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj
- src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj
- src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
- src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj
- src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj
- src/Microsoft.PowerShell.GlobalTool.Shim/Microsoft.PowerShell.GlobalTool.Shim.csproj
- src/Microsoft.PowerShell.MarkdownRender/Microsoft.PowerShell.MarkdownRender.csproj
- src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj
- src/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.csproj
- src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj
- src/Microsoft.WSMan.Runtime/Microsoft.WSMan.Runtime.csproj
- src/Modules/PSGalleryModules.csproj
- src/powershell-win-core/powershell-win-core.csproj
- tools/ci.psm1
- tools/packaging/*
variables:
- name: GIT_CONFIG_PARAMETERS

View file

@ -53,9 +53,9 @@
<!-- Set properties for add/remove programs -->
<Property Id="ARPHELPLINK" Value="$(var.InfoURL)" />
<!-- custom images -->
<WixVariable Id="WixUIBannerBmp" Value="assets\WixUIBannerBmp.png" />
<WixVariable Id="WixUIDialogBmp" Value="assets\WixUIDialogBmp.png" />
<WixVariable Id="WixUIExclamationIco" Value="assets\WixUIInfoIco.png" />
<WixVariable Id="WixUIBannerBmp" Value="assets\wix\WixUIBannerBmp.png" />
<WixVariable Id="WixUIDialogBmp" Value="assets\wix\WixUIDialogBmp.png" />
<WixVariable Id="WixUIExclamationIco" Value="assets\wix\WixUIInfoIco.png" />
<WixVariable Id="WixUIInfoIco" Value="assets\ps_black_32x32.ico" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Open $(var.ProductName)" />
<!-- Default value of Checkbox of starting PowerShell after installation -->

View file

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -14,7 +14,7 @@ Describe "Windows Installer" -Tags "Scenario" {
}
It "WiX (Windows Installer XML) file contains pre-requisites link $preRequisitesLink" -Skip:$skipTest {
$wixProductFile = Join-Path -Path $PSScriptRoot -ChildPath "..\..\..\assets\Product.wxs"
$wixProductFile = Join-Path -Path $PSScriptRoot -ChildPath "..\..\..\assets\wix\Product.wxs"
(Get-Content $wixProductFile -Raw).Contains($preRequisitesLink) | Should -BeTrue
}

View file

@ -2844,7 +2844,7 @@ function New-MSIPatch
[Parameter(HelpMessage='Path to the patch template WXS. Usually you do not need to specify this')]
[ValidateNotNullOrEmpty()]
[ValidateScript( {Test-Path $_})]
[string] $PatchWxsPath = "$RepoRoot\assets\patch-template.wxs",
[string] $PatchWxsPath = "$RepoRoot\assets\wix\patch-template.wxs",
[Parameter(HelpMessage='Produce a delta patch instead of a full patch. Usually not worth it.')]
[switch] $Delta
@ -2884,7 +2884,7 @@ function New-MSIPatch
Copy-Item -Path $BaselineWixPdbPath -Destination $wixBaselineOriginalPdbPath -Force
Copy-Item -Path $PatchWixPdbPath -Destination $wixPatchOriginalPdbPath -Force
[xml] $filesAssetXml = Get-Content -Raw -Path "$RepoRoot\assets\files.wxs"
[xml] $filesAssetXml = Get-Content -Raw -Path "$RepoRoot\assets\wix\files.wxs"
[xml] $patchTemplateXml = Get-Content -Raw -Path $PatchWxsPath
# Update the patch version
@ -2975,12 +2975,12 @@ function New-MSIPackage
# File describing the MSI Package creation semantics
[ValidateNotNullOrEmpty()]
[ValidateScript( {Test-Path $_})]
[string] $ProductWxsPath = "$RepoRoot\assets\Product.wxs",
[string] $ProductWxsPath = "$RepoRoot\assets\wix\Product.wxs",
# File describing the MSI file components
[ValidateNotNullOrEmpty()]
[ValidateScript( {Test-Path $_})]
[string] $FilesWxsPath = "$RepoRoot\assets\Files.wxs",
[string] $FilesWxsPath = "$RepoRoot\assets\wix\Files.wxs",
# Path to Assets folder containing artifacts such as icons, images
[ValidateNotNullOrEmpty()]
@ -3331,7 +3331,7 @@ function Test-FileWxs
# File describing the MSI file components from the asset folder
[ValidateNotNullOrEmpty()]
[ValidateScript( {Test-Path $_})]
[string] $FilesWxsPath = "$RepoRoot\assets\Files.wxs",
[string] $FilesWxsPath = "$RepoRoot\assets\wix\Files.wxs",
# File describing the MSI file components generated by heat
[ValidateNotNullOrEmpty()]