Restructure pipeline to move release steps out of Package ES (#1659)

* Pipeline update
* moving download internals up in order
* updated internal download step and removed duplicate isPublicRelease parameter
This commit is contained in:
Quentin Al-Timimi
2021-08-26 08:47:10 -07:00
committed by GitHub
parent 10ae9430a0
commit b0e9e0ab56
10 changed files with 305 additions and 279 deletions

View File

@@ -1,8 +1,10 @@
# This template contains a job which takes .appx packages which were built separately for each
# architecture (arm, x86, etc.) and combines them into a single .appxbundle.
# architecture (arm, x86, etc.) and combines them into a single .appxbundle. In release builds,
# this job also signs the bundle and creates StoreBroker packages.
parameters:
signBundle: false
useTestVersionOfInternalsPackage: false
jobs:
- job: Package
@@ -21,6 +23,8 @@ jobs:
vmImage: windows-2019
variables:
skipComponentGovernanceDetection: true
StoreBrokerMediaRootPath: $(TEMP)\SBMedia
StoreBrokerPackagePath: $(Build.ArtifactStagingDirectory)\storeBrokerPayload
steps:
- checkout: self
fetchDepth: 1
@@ -31,6 +35,26 @@ jobs:
artifactName: drop
itemPattern: '**/*.appx'
- ${{ if eq(parameters.createStoreBrokerPackages, true) }}:
- task: UniversalPackages@0
displayName: Download internals package
inputs:
command: download
downloadDirectory: $(Build.SourcesDirectory)
vstsFeed: WindowsInboxApps
vstsFeedPackage: calculator-internals
vstsPackageVersion: 0.0.66
- ${{ if eq(parameters.useTestVersionOfInternalsPackage, true) }}:
- task: UniversalPackages@0
displayName: Download internals package
inputs:
command: download
downloadDirectory: $(Build.SourcesDirectory)
vstsFeed: WindowsInboxApps
vstsFeedPackage: calculator-internals
vstsPackageVersion: 0.0.65
- task: PowerShell@2
displayName: Generate AppxBundle mapping
inputs:
@@ -98,4 +122,43 @@ jobs:
displayName: Publish AppxBundleSigned artifact
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)\appxBundle
artifactName: appxBundleSigned
artifactName: appxBundleSigned
- ${{ if eq(parameters.createStoreBrokerPackages, true) }}:
- powershell: |
# Just modify this line to indicate where your en-us PDP file is. Leave the other lines alone.
$enUSPdpFilePath = "$(Build.SourcesDirectory)\PDP\en-US\PDP.xml"
# This is going to save the release value from the PDP file to $(SBMediaReleaseVersion)
# which you can then refer to in the UniversalPackages task.
$release = ([xml](Get-Content $enUSPdpFilePath)).ProductDescription.Release.Trim()
Write-Host "##vso[task.setvariable variable=SBMediaReleaseVersion;]$release"
displayName: Determine the PDP Media release version from the en-us PDP file
- task: UniversalPackages@0
displayName: Download PDP media (screenshots, trailers) universal package
inputs:
command: download
downloadDirectory: $(StoreBrokerMediaRootPath)/$(SBMediaReleaseVersion)
vstsFeed: WindowsInboxApps
vstsFeedPackage: calculator-pdp-media
vstsPackageVersion: $(SBMediaReleaseVersion)
- task: MS-RDX-MRO.windows-store-publish-dev.package-task.store-package@2
displayName: Create StoreBroker Payload
inputs:
serviceEndpoint: Calculator StoreBroker Connection
sbConfigPath: Tools/Build/StoreBroker/SBCalculatorConfig.json
sourceFolder: $(Build.ArtifactStagingDirectory)/appxBundle
contents: Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle
pdpPath: $(Build.SourcesDirectory)\PDP
pdpInclude: PDP.xml
pdpMediaPath: $(StoreBrokerMediaRootPath)
outSBPackagePath: $(StoreBrokerPackagePath)
outSBName: SBCalculator
- task: PublishBuildArtifacts@1
displayName: Publish StoreBroker Payload artifact
inputs:
pathtoPublish: $(StoreBrokerPackagePath)
artifactName: storeBrokerPayload