This commit is contained in:
Tian Liao 2023-10-26 00:26:03 +08:00
commit b1df329d9e
6 changed files with 57 additions and 34 deletions

View file

@ -31,8 +31,8 @@ jobs:
outputs:
- output: pipelineArtifact
displayName: Publish drop artifact
targetPath: $(Build.BinariesDirectory)
artifactName: drop
targetPath: $(Build.BinariesDirectory)\$(BuildConfiguration)\${{ parameters.platform }}
artifactName: drop-${{ parameters.platform }}
steps:
- checkout: self

View file

@ -3,7 +3,6 @@
# this job also signs the bundle and creates StoreBroker packages.
parameters:
isOSSBuild: false
signBundle: false
createStoreBrokerPackages: false
@ -22,15 +21,14 @@ jobs:
in(dependencies.BuildARM.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
in(dependencies.BuildARM64.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')
)
pool:
${{ if eq(parameters.isOSSBuild, true) }}:
name: EssentialExperiencesOpenSource-windows-2022
${{ if eq(parameters.isOSSBuild, false) }}:
name: EssentialExperiences-windows-2022
variables:
skipComponentGovernanceDetection: true
StoreBrokerMediaRootPath: $(TEMP)\SBMedia
StoreBrokerPackagePath: $(Build.ArtifactStagingDirectory)\storeBrokerPayload
PackageX86: $[in(dependencies.Buildx86.result, 'Succeeded', 'SucceededWithIssues')]
PackageX64: $[in(dependencies.Buildx64.result, 'Succeeded', 'SucceededWithIssues')]
PackageARM: $[in(dependencies.BuildARM.result, 'Succeeded', 'SucceededWithIssues')]
PackageARM64: $[in(dependencies.BuildARM64.result, 'Succeeded', 'SucceededWithIssues')]
templateContext:
outputs:
- ${{ if eq(parameters.signBundle, true) }}:
@ -53,12 +51,37 @@ jobs:
- checkout: self
fetchDepth: 1
- task: DownloadBuildArtifacts@0
displayName: Download all .msix artifacts
- task: DownloadPipelineArtifacts@2
displayName: Download all .msix artifacts (x86)
condition: and(succeeded(), eq(variables.PackageX86, 'true'))
inputs:
artifactName: drop
artifactName: drop-x86
itemPattern: '**/*.msix'
targetPath: $(Build.ArtifactStagingDirectory)
targetPath: $(Build.ArtifactStagingDirectory)\drop\x86
- task: DownloadPipelineArtifacts@2
displayName: Download all .msix artifacts (x64)
condition: and(succeeded(), eq(variables.PackageX64, 'true'))
inputs:
artifactName: drop-x64
itemPattern: '**/*.msix'
targetPath: $(Build.ArtifactStagingDirectory)\drop\x64
- task: DownloadPipelineArtifacts@2
displayName: Download all .msix artifacts (ARM)
condition: and(succeeded(), eq(variables.PackageARM, 'true'))
inputs:
artifactName: drop-ARM
itemPattern: '**/*.msix'
targetPath: $(Build.ArtifactStagingDirectory)\drop\ARM
- task: DownloadPipelineArtifacts@2
displayName: Download all .msix artifacts (ARM64)
condition: and(succeeded(), eq(variables.PackageARM64, 'true'))
inputs:
artifactName: drop-ARM64
itemPattern: '**/*.msix'
targetPath: $(Build.ArtifactStagingDirectory)\drop\ARM64
- ${{ if eq(parameters.createStoreBrokerPackages, true) }}:
- task: UniversalPackages@0

View file

@ -13,10 +13,9 @@ jobs:
steps:
- checkout: none
- task: DownloadBuildArtifacts@0
- download: current
displayName: Download storeBrokerPayload artifact
inputs:
artifactName: storeBrokerPayload
artifact: storeBrokerPayload
- task: MS-RDX-MRO.windows-store-publish-dev.flight-task.store-flight@2
displayName: Flight StoreBroker Payload to team ring

View file

@ -16,10 +16,9 @@ jobs:
steps:
- checkout: none
- task: DownloadBuildArtifacts@0
- download: current
displayName: Download msixBundleSigned artifact
inputs:
artifactName: msixBundleSigned
artifact: msixBundleSigned
- task: CopyFiles@2
displayName: Copy signed MsixBundle to vpack staging folder

View file

@ -17,6 +17,8 @@ jobs:
name: EssentialExperiences-Win11
variables:
skipComponentGovernanceDetection: true
DropName: drop-${{ parameters.platform }}
steps:
- checkout: self
fetchDepth: 1
@ -33,30 +35,29 @@ jobs:
width: 1920
height: 1080
- task: DownloadBuildArtifacts@0
- download: current
displayName: Download MsixBundle and CalculatorUITests
inputs:
artifactName: drop
itemPattern: |
drop/Release/${{ parameters.platform }}/Calculator/AppPackages/**
drop/Release/${{ parameters.platform }}/publish/**
artifact: $(DropName)
patterns: |
Calculator/AppPackages/**
publish/**
- task: PowerShell@2
displayName: Install certificate
inputs:
filePath: $(Pipeline.Workspace)/drop/Release/${{ parameters.platform }}/Calculator/AppPackages/Calculator_$(Build.BuildNumber)_Test/Add-AppDevPackage.ps1
arguments: -CertificatePath $(Pipeline.Workspace)/drop/Release/${{ parameters.platform }}/Calculator/AppPackages/Calculator_$(Build.BuildNumber)_Test/Calculator_$(Build.BuildNumber)_${{ parameters.platform }}.cer -Force
filePath: $(Pipeline.Workspace)/$(DropName)/Calculator/AppPackages/Calculator_$(Build.BuildNumber)_Test/Add-AppDevPackage.ps1
arguments: -CertificatePath $(Pipeline.Workspace)/$(DropName)/Calculator/AppPackages/Calculator_$(Build.BuildNumber)_Test/Calculator_$(Build.BuildNumber)_${{ parameters.platform }}.cer -Force
- task: PowerShell@2
displayName: Install app
inputs:
filePath: $(Pipeline.Workspace)/drop/Release/${{ parameters.platform }}/Calculator/AppPackages/Calculator_$(Build.BuildNumber)_Test/Add-AppDevPackage.ps1
filePath: $(Pipeline.Workspace)/$(DropName)/Calculator/AppPackages/Calculator_$(Build.BuildNumber)_Test/Add-AppDevPackage.ps1
arguments: -Force
- task: VSTest@2
displayName: Run CalculatorUITests
inputs:
testAssemblyVer2: $(Pipeline.Workspace)/drop/Release/${{ parameters.platform }}/publish/CalculatorUITests.dll
runSettingsFile: $(Pipeline.Workspace)/drop/Release/${{ parameters.platform }}/publish/${{ parameters.runsettingsFileName }}
testAssemblyVer2: $(Pipeline.Workspace)/$(DropName)/publish/CalculatorUITests.dll
runSettingsFile: $(Pipeline.Workspace)/$(DropName)/publish/${{ parameters.runsettingsFileName }}
platform: ${{ parameters.platform }}
configuration: Release

View file

@ -11,22 +11,23 @@ jobs:
condition: succeeded()
variables:
skipComponentGovernanceDetection: true
UnitTestsDir: $(Pipeline.Workspace)\drop-${{ parameters.platform }}\CalculatorUnitTests\AppPackages\CalculatorUnitTests_Test
steps:
- checkout: none
- download: current
displayName: Download CalculatorUnitTests
artifact: drop
patterns: drop/Release/${{ parameters.platform }}/CalculatorUnitTests/AppPackages/CalculatorUnitTests_Test/**
artifact: drop-${{ parameters.platform }}
patterns: '**/CalculatorUnitTests_Test/**'
- task: PowerShell@2
displayName: Install Certificate
inputs:
filePath: $(Pipeline.Workspace)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests\AppPackages\CalculatorUnitTests_Test\Add-AppDevPackage.ps1
arguments: -CertificatePath $(Pipeline.Workspace)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests\AppPackages\CalculatorUnitTests_Test\CalculatorUnitTests.cer -Force
filePath: $(UnitTestsDir)\Add-AppDevPackage.ps1
arguments: -CertificatePath $(UnitTestsDir)\CalculatorUnitTests.cer -Force
- task: VSTest@2
displayName: Run CalculatorUnitTests
inputs:
testAssemblyVer2: $(Pipeline.Workspace)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests\AppPackages\CalculatorUnitTests_Test\CalculatorUnitTests.msix
testAssemblyVer2: $(UnitTestsDir)\CalculatorUnitTests.msix
otherConsoleOptions: /Platform:${{ parameters.platform }}