Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions assets/wix/files.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -3137,6 +3137,9 @@
<Component Id="cmp408A3AF905EB47ADA35FBC5A6B1465A0">
<File Id="fil2146848B6ACB45FCA8E9C8FEE3BECDD8" KeyPath="yes" Source="$(var.ProductSourcePath)\_manifest\spdx_2.2\manifest.spdx.json" />
</Component>
<Component Id="cmp58D994EAF5F64D618ABC0E63DCD48C05">
<File Id="filFB88509DC8C044A28FF3B7CF61B1CE4F" KeyPath="yes" Source="$(var.ProductSourcePath)\_manifest\spdx_2.2\manifest.spdx.json.sha256" />
</Component>
</Directory>
</Directory>
<Component Id="cmpA6276F9EAB41411AAAEC496E67A3DBAE">
Expand Down Expand Up @@ -4170,6 +4173,7 @@
<ComponentRef Id="cmp0C4751F9D5C14419A45F234152D21DA9" />
<ComponentRef Id="cmpF96C036EAE3B436DB096888697193FAF" />
<ComponentRef Id="cmp789F545EA2CB4AC5A2688CF730A5F6B4" />
<ComponentRef Id="cmp58D994EAF5F64D618ABC0E63DCD48C05" />
</ComponentGroup>
</Fragment>
</Wix>
7 changes: 3 additions & 4 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,9 @@ Fix steps:
# Add --self-contained due to "warning NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used."
if ($Options.Runtime -like 'fxdependent*') {
$Arguments += "--no-self-contained"
# The UseAppHost = false property avoids creating ".exe" for the fxdependent packages.
# The ".exe" is not a cross-platform executable, but specific to the platform that it was built on.
# We do not need to ship that.
$Arguments += "/property:UseAppHost=false"
# The UseAppHost = true property creates ".exe" for the fxdependent packages.
# We need this in the package as Start-Job needs it.
$Arguments += "/property:UseAppHost=true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we removed this because it was not signed.. we should sign it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.. let me check the test build.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the packaging code.

}
else {
$Arguments += "--self-contained"
Expand Down
27 changes: 27 additions & 0 deletions tools/releaseBuild/azureDevOps/releasePipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,31 @@ stages:
globalToolExeName: 'pwsh'
globalToolPackageName: 'PowerShell.Linux.x64'

- stage: ValidateFxdPackage
displayName: Validate Fxd Package
dependsOn: []
jobs:
- template: templates/release-ValidateFxdPackage.yml
parameters:
jobName: WinFxdPackage
displayName: Fxd Package Test Win
imageName: windows-latest
packageNamePattern: '**/*win-fxdependent.zip'

- template: templates/release-ValidateFxdPackage.yml
parameters:
jobName: FxdPackageWindDesktop
displayName: Fxd Package Test WinDesktop
imageName: windows-latest
packageNamePattern: '**/*win-fxdependentWinDesktop.zip'

- template: templates/release-ValidateFxdPackage.yml
parameters:
jobName: FxdPackageLinux
displayName: Fxd Package Test Linux
imageName: ubuntu-latest
packageNamePattern: '**/*fxdependent.tar.gz'

- stage: StaticPkgValidation
dependsOn: []
displayName: Static package validation
Expand Down Expand Up @@ -142,6 +167,8 @@ stages:
- StartDocker
- ManualValidation
- ReleaseAutomation
- ValidateFxdPackage
- ValidateGlobalTool

# The environment here is used for approval.
jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
parameters:
jobName: ""
displayName: ""
imageName: ""
packageNamePattern: ""

jobs:
- job: ${{ parameters.jobName }}
displayName: ${{ parameters.displayName }}
pool:
vmImage: ${{ parameters.imageName }}
steps:
- checkout: self
clean: true

- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: PowerShellCore
pipeline: '696'
preferTriggeringPipeline: true
runVersion: latestFromBranch
runBranch: '$(Build.SourceBranch)'
artifact: finalResults
patterns: '${{ parameters.packageNamePattern }}'
path: '$(Pipeline.Workspace)/releasePipeline/finalResults'

- pwsh: |
Get-ChildItem -Path '$(Pipeline.Workspace)/releasePipeline/finalResults' -Recurse
displayName: Capture downloaded package

- pwsh: |
$destPath = New-Item '$(Pipeline.Workspace)/releasePipeline/finalResults/fxd' -ItemType Directory
$packageNameFilter = '${{ parameters.packageNamePattern }}'

if ($packageNameFilter.EndsWith('tar.gz')) {
$package = @(Get-ChildItem -Path '$(Pipeline.Workspace)/releasePipeline/finalResults/*.tar.gz')
Write-Verbose -Verbose "Package: $package"
if ($package.Count -ne 1) {
throw 'Only 1 package was expected.'
}
tar -xvf $package.FullName -C $destPath
}
else {
$package = @(Get-ChildItem -Path '$(Pipeline.Workspace)/releasePipeline/finalResults/*.zip')
Write-Verbose -Verbose "Package: $package"
if ($package.Count -ne 1) {
throw 'Only 1 package was expected.'
}
Expand-Archive -Path $package.FullName -Destination "$destPath" -Verbose
}
displayName: Expand fxd package

- pwsh: |
$packageNameFilter = '${{ parameters.packageNamePattern }}'
$pwshExeName = if ($packageNameFilter.EndsWith('tar.gz')) { 'pwsh' } else { 'pwsh.exe' }
$actualOutput = & $pwshExeName -c 'Start-Job -ScriptBlock { "1" } | Wait-Job | Receive-Job'
Write-Verbose -Verbose "Actual output: $actualOutput"
if ($actualOutput -ne 1) {
throw "Actual output is not as expected"
}
displayName: Test package
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,14 @@ jobs:
"$($fullSymbolsFolder)\Modules\PSDiagnostics\PSDiagnostics.ps?1" = "Modules\PSDiagnostics"
"$($fullSymbolsFolder)\pwsh.dll" = ""
"$($fullSymbolsFolder)\System.Management.Automation.dll" = ""
"$($fullSymbolsFolder)\pwsh.exe" = ""
}

$itemsToExclude = @(
# This package is retrieved from https://www.github.com/powershell/MarkdownRender
"$($fullSymbolsFolder)\Microsoft.PowerShell.MarkdownRender.dll"
)

if ("$env:Architecture" -notlike 'fxdependent*')
{
$itemsToCopy += @{"$($fullSymbolsFolder)\pwsh.exe" = ""}
}

Write-Verbose -verbose "recusively copying $($itemsToCopyWithRecurse | out-string) to $filesToSignDirectory"
Copy-Item -Path $itemsToCopyWithRecurse -Destination $filesToSignDirectory -Recurse -verbose -exclude $itemsToExclude

Expand Down