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
9 changes: 8 additions & 1 deletion tools/releaseBuild/azureDevOps/releasePipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ variables:
value: none

stages:
- stage: MSIXBundle
displayName: Create MSIX Bundle package
dependsOn: []
jobs:
- template: templates/release-MsixBundle.yml

- stage: ValidateSDK
displayName: Validate SDK
dependsOn: []
Expand Down Expand Up @@ -118,6 +124,7 @@ stages:
displayName: Create GitHub draft release
# do not include stages that are likely to fail in dependency as there is no way to force deploy.
dependsOn:
- MSIXBundle
- ValidateSDK
- PRCreation
- ValidatePkgNames
Expand Down Expand Up @@ -242,7 +249,7 @@ stages:
displayName: Publish MSIX to store
jobs:
- deployment: PublishMsix
displayName: Publish MSIX to store
displayName: Publish the MSIX Bundle package to store
Comment thread
daxian-dbw marked this conversation as resolved.
pool: server
environment: PSReleasePublishMsix

Expand Down
70 changes: 70 additions & 0 deletions tools/releaseBuild/azureDevOps/templates/release-MsixBundle.yml
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'
Comment thread
daxian-dbw marked this conversation as 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: |
Comment thread
daxian-dbw marked this conversation as 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