-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Create MSIX Bundle package in release pipeline #14982
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
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
06f1273
wip
daxian-dbw 614ed3a
Create msixbundle file in release pipeline
daxian-dbw 65b7e53
Fix syntax error
daxian-dbw 919cac5
Make 'GitHubDraftRelease' depends on 'MSIXBundle'
daxian-dbw c8a783e
Use co-ordinate build from the 'size' branch
daxian-dbw 8ea0d85
fix runBranch
daxian-dbw 4b270c6
Fix install tool step
daxian-dbw 0c0a282
One more fix
daxian-dbw bac4661
Another fix to tool install
daxian-dbw d0479e9
Fix minor issue
daxian-dbw bcbb8ee
Fix upload
daxian-dbw e9d7fdf
Fix the runBranch
daxian-dbw 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
70 changes: 70 additions & 0 deletions
70
tools/releaseBuild/azureDevOps/templates/release-MsixBundle.yml
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,70 @@ | ||
| jobs: | ||
| - job: CreateMSIXBundle | ||
| displayName: Create .msixbundle file | ||
| pool: | ||
| vmImage: windows-latest | ||
| variables: | ||
| - group: msixTools | ||
| - group: 'Azure Blob variable group' | ||
|
|
||
| steps: | ||
| - template: release-SetReleaseTagAndContainerName.yml | ||
|
|
||
| - task: DownloadPipelineArtifact@2 | ||
| inputs: | ||
| source: specific | ||
| project: PowerShellCore | ||
| pipeline: '696' | ||
daxian-dbw marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| preferTriggeringPipeline: true | ||
| runVersion: latestFromBranch | ||
| runBranch: '$(Build.SourceBranch)' | ||
| artifact: finalResults | ||
| patterns: '**/*.msix' | ||
| path: '$(Pipeline.Workspace)\releasePipeline\msix' | ||
|
|
||
| - pwsh: | | ||
| $cmd = Get-Command makeappx.exe -ErrorAction Ignore | ||
| if ($cmd) { | ||
| Write-Verbose -Verbose 'makeappx available in PATH' | ||
| $exePath = $cmd.Source | ||
| } else { | ||
| $toolsDir = '$(Pipeline.Workspace)\releasePipeline\tools' | ||
| New-Item $toolsDir -Type Directory -Force > $null | ||
| Invoke-RestMethod -Uri '$(makeappUrl)' -OutFile "$toolsDir\makeappx.zip" | ||
| Expand-Archive "$toolsDir\makeappx.zip" -DestinationPath "$toolsDir\makeappx" -Force | ||
| $exePath = "$toolsDir\makeappx\makeappx.exe" | ||
| Write-Verbose -Verbose 'makeappx was installed:' | ||
| Get-ChildItem -Path $toolsDir -Recurse | ||
| } | ||
| $vstsCommandString = "vso[task.setvariable variable=MakeAppxPath]$exePath" | ||
| Write-Host "sending " + $vstsCommandString | ||
| Write-Host "##$vstsCommandString" | ||
| displayName: Install makeappx tool | ||
| - pwsh: | | ||
| $sourceDir = '$(Pipeline.Workspace)\releasePipeline\msix' | ||
| $file = Get-ChildItem $sourceDir | Select-Object -First 1 | ||
| $prefix = ($file.BaseName -split "-win")[0] | ||
| $pkgName = "$prefix.msixbundle" | ||
| Write-Verbose -Verbose "Creating $pkgName" | ||
| $makeappx = '$(MakeAppxPath)' | ||
| $outputDir = "$sourceDir\output" | ||
| New-Item $outputDir -Type Directory -Force > $null | ||
| & $makeappx bundle /d $sourceDir /p "$outputDir\$pkgName" | ||
| Get-ChildItem -Path $sourceDir -Recurse | ||
| $vstsCommandString = "vso[task.setvariable variable=BundleDir]$outputDir" | ||
| Write-Host "sending " + $vstsCommandString | ||
| Write-Host "##$vstsCommandString" | ||
| displayName: Create MsixBundle | ||
| - pwsh: | | ||
daxian-dbw marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ## We use AzCopy v8.1 in our release pipeline, see the documentation at: | ||
| ## https://docs.microsoft.com/en-us/previous-versions/azure/storage/storage-use-azcopy | ||
| $azcopy = "C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy\AzCopy.exe" | ||
| & $azcopy /Source:$(BundleDir) /Dest:https://$(StorageAccount).blob.core.windows.net/$(AzureVersion)-private /DestKey:$(StorageAccountKey) /Pattern:*.msixbundle | ||
| displayName: Upload MSIX Bundle package to Az Blob | ||
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.
Uh oh!
There was an error while loading. Please reload this page.