-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[release/v7.4.15] Publish .msixbundle package as a VPack
#27187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
adityapatwardhan
merged 1 commit into
PowerShell:release/v7.4.15
from
adityapatwardhan:backport/release/v7.4.15/25612-70b4bda20
Apr 3, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,147 @@ | ||
| trigger: none | ||
|
|
||
| parameters: # parameters are shown up in ADO UI in a build queue time | ||
| - name: 'createVPack' | ||
| displayName: 'Create and Submit VPack' | ||
| type: boolean | ||
| default: true | ||
| - name: 'debug' | ||
| displayName: 'Enable debug output' | ||
| type: boolean | ||
| default: false | ||
| - name: 'ReleaseTagVar' | ||
| type: string | ||
| displayName: 'Release Tag Var:' | ||
| default: 'fromBranch' | ||
|
|
||
| name: msixbundle_vPack_$(date:yyMM).$(date:dd)$(rev:rrr) | ||
|
|
||
| variables: | ||
| CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] | ||
| system.debug: ${{ parameters.debug }} | ||
| BuildSolution: $(Build.SourcesDirectory)\dirs.proj | ||
| ReleaseTagVar: ${{ parameters.ReleaseTagVar }} | ||
| BuildConfiguration: Release | ||
| WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest' | ||
| Codeql.Enabled: false # pipeline is not building artifacts; it repackages existing artifacts into a vpack | ||
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
| POWERSHELL_TELEMETRY_OPTOUT: 1 | ||
|
|
||
| resources: | ||
| repositories: | ||
| - repository: templates | ||
| type: git | ||
| name: OneBranch.Pipelines/GovernedTemplates | ||
| ref: refs/heads/main | ||
|
|
||
| pipelines: | ||
| - pipeline: PSPackagesOfficial | ||
| source: 'PowerShell-Packages-Official' | ||
| trigger: | ||
| branches: | ||
| include: | ||
| - master | ||
| - releases/* | ||
|
|
||
| extends: | ||
| template: v2/Microsoft.Official.yml@templates | ||
| parameters: | ||
| platform: | ||
| name: 'windows_undocked' # windows undocked | ||
|
|
||
| cloudvault: | ||
| enabled: false | ||
|
|
||
| globalSdl: | ||
| useCustomPolicy: true # for signing code | ||
| disableLegacyManifest: true | ||
| # disabled Armory as we dont have any ARM templates to scan. It fails on some sample ARM templates. | ||
| armory: | ||
| enabled: false | ||
| sbom: | ||
| enabled: true | ||
| compiled: | ||
| enabled: false | ||
| credscan: | ||
| enabled: true | ||
| scanFolder: $(Build.SourcesDirectory) | ||
| suppressionsFile: $(Build.SourcesDirectory)\.config\suppress.json | ||
| binskim: | ||
| enabled: false | ||
| # APIScan requires a non-Ready-To-Run build | ||
| apiscan: | ||
| enabled: false | ||
| asyncSDL: | ||
| enabled: false | ||
| tsaOptionsFile: .config/tsaoptions.json | ||
|
|
||
| stages: | ||
| - stage: build | ||
| jobs: | ||
| - job: main | ||
| pool: | ||
| type: windows | ||
|
|
||
| variables: | ||
| ob_outputDirectory: '$(BUILD.SOURCESDIRECTORY)\out' | ||
| ob_createvpack_enabled: ${{ parameters.createVPack }} | ||
| ob_createvpack_packagename: 'PowerShell.app' | ||
| ob_createvpack_owneralias: 'dongbow' | ||
| ob_createvpack_description: 'VPack for the PowerShell Application' | ||
| ob_createvpack_targetDestinationDirectory: '$(Destination)' | ||
| ob_createvpack_propsFile: false | ||
| ob_createvpack_provData: true | ||
| ob_createvpack_metadata: '$(Build.SourceVersion)' | ||
| ob_createvpack_versionAs: string | ||
| ob_createvpack_version: '$(version)' | ||
| ob_createvpack_verbose: true | ||
|
|
||
| steps: | ||
| - template: .pipelines/templates/SetVersionVariables.yml@self | ||
| parameters: | ||
| ReleaseTagVar: $(ReleaseTagVar) | ||
| UseJson: no | ||
|
|
||
| - pwsh: | | ||
| Write-Verbose -Verbose 'PowerShell Version: $(version)' | ||
| if('$(version)' -match '-') { | ||
| throw "Don't release a preview build msixbundle package" | ||
| } | ||
| displayName: Stop any preview release | ||
|
|
||
| - download: PSPackagesOfficial | ||
| artifact: 'drop_msixbundle_CreateMSIXBundle' | ||
| displayName: Download package | ||
|
|
||
| - pwsh: | | ||
| $payloadDir = '$(Pipeline.Workspace)\PSPackagesOfficial\drop_msixbundle_CreateMSIXBundle' | ||
| Get-ChildItem $payloadDir -Recurse | Out-String -Width 150 | ||
| $vstsCommandString = "vso[task.setvariable variable=PayloadDir]$payloadDir" | ||
| Write-Host "sending " + $vstsCommandString | ||
| Write-Host "##$vstsCommandString" | ||
| displayName: 'Capture Artifact Listing' | ||
|
|
||
| - pwsh: | | ||
| $bundlePackage = Get-ChildItem '$(PayloadDir)\*.msixbundle' | ||
| Write-Verbose -Verbose ("MSIX bundle package: " + $bundlePackage.FullName -join ', ') | ||
| if ($bundlePackage.Count -ne 1) { | ||
| throw "Expected to find 1 MSIX bundle package, but found $($bundlePackage.Count)" | ||
| } | ||
|
|
||
| if (-not (Test-Path '$(ob_outputDirectory)' -PathType Container)) { | ||
| $null = New-Item '$(ob_outputDirectory)' -ItemType Directory -ErrorAction Stop | ||
| } | ||
|
|
||
| $targetPath = Join-Path '$(ob_outputDirectory)' 'Microsoft.PowerShell_8wekyb3d8bbwe.msixbundle' | ||
| Copy-Item -Verbose -Path $bundlePackage.FullName -Destination $targetPath | ||
| displayName: 'Stage msixbundle for vpack' | ||
|
|
||
| - pwsh: | | ||
| Write-Verbose "VPack Version: $(ob_createvpack_version)" -Verbose | ||
| $vpackFiles = Get-ChildItem -Path $(ob_outputDirectory)\* -Recurse | ||
| if($vpackFiles.Count -eq 0) { | ||
| throw "No files found in $(ob_outputDirectory)" | ||
| } | ||
| $vpackFiles | Out-String -Width 150 | ||
| displayName: Debug Output Directory and Version | ||
| condition: succeededOrFailed() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The call to
.pipelines/templates/SetVersionVariables.yml@selfpassesUseJson, but the template defines the parameter asCreateJson. Azure Pipelines template expansion will fail with an unexpected-parameter error. RenameUseJsontoCreateJson(e.g.,CreateJson: 'no') to match the template signature.