Collect jobs into stages

This commit is contained in:
Tian Liao 2024-04-29 16:04:51 +08:00
commit 904c99438b

View file

@ -15,6 +15,10 @@ variables:
name: '$(versionMajor).$(versionMinor).$(versionBuild).$(versionPatch)' name: '$(versionMajor).$(versionMinor).$(versionBuild).$(versionPatch)'
parameters:
buildPlatformList: [x64, x86, ARM, ARM64]
testPlatformList: [x64, x86]
resources: resources:
repositories: repositories:
- repository: 1esPipelines - repository: 1esPipelines
@ -31,57 +35,42 @@ extends:
os: windows os: windows
stages: stages:
- stage: Calculator - stage: BuildStage
jobs: jobs:
- template: /build/pipelines/templates/build-single-architecture.yaml@self - ${{ each platform in parameters.buildPlatformList }}:
parameters: - template: /build/pipelines/templates/build-single-architecture.yaml@self
platform: x64 parameters:
isReleaseBuild: true platform: ${{ platform }}
useReleaseAppxmanifest: true isReleaseBuild: true
useReleaseAppxmanifest: true
- template: /build/pipelines/templates/build-single-architecture.yaml@self - stage: UnitTestStage
parameters: dependsOn: BuildStage
platform: x86 jobs:
isReleaseBuild: true - ${{ each platform in parameters.testPlatformList }}:
useReleaseAppxmanifest: true - template: /build/pipelines/templates/run-unit-tests.yaml@self
condition: not(eq(variables['Build.Reason'], 'PullRequest')) parameters:
platform: ${{ platform }}
- template: /build/pipelines/templates/build-single-architecture.yaml@self - stage: UiTestStage
parameters: dependsOn: BuildStage
platform: ARM jobs:
isReleaseBuild: true - ${{ each platform in parameters.testPlatformList }}:
useReleaseAppxmanifest: true - template: /build/pipelines/templates/run-ui-tests.yaml@self
condition: not(eq(variables['Build.Reason'], 'PullRequest')) parameters:
platform: ${{ platform }}
- template: /build/pipelines/templates/build-single-architecture.yaml@self runsettingsFileName: CalculatorUITests.release.runsettings
parameters:
platform: ARM64
isReleaseBuild: true
useReleaseAppxmanifest: true
condition: not(eq(variables['Build.Reason'], 'PullRequest'))
- template: /build/pipelines/templates/run-ui-tests.yaml@self
parameters:
platform: x64
runsettingsFileName: CalculatorUITests.release.runsettings
- template: /build/pipelines/templates/run-ui-tests.yaml@self
parameters:
platform: x86
runsettingsFileName: CalculatorUITests.release.runsettings
- template: /build/pipelines/templates/run-unit-tests.yaml@self
parameters:
platform: x64
- template: /build/pipelines/templates/run-unit-tests.yaml@self
parameters:
platform: x86
- stage: PackageStage
dependsOn: [UnitTestStage, UiTestStage]
jobs:
- template: /build/pipelines/templates/package-msixbundle.yaml@self - template: /build/pipelines/templates/package-msixbundle.yaml@self
parameters: parameters:
signBundle: true signBundle: true
createStoreBrokerPackages: true createStoreBrokerPackages: true
- stage: PublishStage
dependsOn: PackageStage
jobs:
- template: /build/pipelines/templates/release-store.yaml@self - template: /build/pipelines/templates/release-store.yaml@self
- template: /build/pipelines/templates/release-vpack.yaml@self - template: /build/pipelines/templates/release-vpack.yaml@self