master
yml 98 lines 2.94 KB
Raw
1 parameters:
2 - name: bypassTests
3 displayName: 'Publish release even if tests fail'
4 type: boolean
5 default: false
6
7 - name: pushToStore
8 displayName: 'Push the release to the Microsoft Store'
9 type: boolean
10 default: true
11
12 - name: testVersion
13 displayName: 'Test the release pipeline'
14 type: string
15 default: ''
16
17 - name: nugetSuffix
18 displayName: 'Nuget version suffix (must include "-")'
19 type: string
20 default: ''
21
22 trigger:
23 tags:
24 include: ['*.*.*']
25
26 variables:
27 WindowsContainerImage: "onebranch.azurecr.io/windows/ltsc2022/vse2022:latest"
28 WindowsHostVersion: '1ESWindows2022'
29
30 resources:
31 repositories:
32 - repository: templates
33 type: git
34 name: OneBranch.Pipelines/GovernedTemplates
35 ref: refs/heads/main
36 - repository: releaseScripts
37 type: git
38 name: Microsoft.WSL/wsl-release-scripts
39 ref: refs/tags/v1
40
41 extends:
42 template: v2/Microsoft.Official.yml@templates
43 parameters:
44 platform:
45 name: "windows_undocked"
46 featureFlags:
47 EnableCDPxPAT: false
48 WindowsHostVersion: 1ESWindows2022
49 globalSdl:
50 credscan:
51 enabled: true
52 codesign:
53 enabled: true
54 break: true
55 targetGlob: '**\*.dll;**\*.exe;**\*.sys;**\*.msi;**\*.msix;**\*.msixbundle;**\*.appx;**\*.nupkg'
56 perStage:
57 credscan:
58 enabled: true
59 tsa:
60 # The 1ES Official governed template force-runs TSA onboarding regardless of this flag.
61 # Without a config file it auto-derives the codebase name "microsoft_Microsoft.WSL_microsoft/WSL",
62 # which contains the illegal characters '.' and '/', so onboarding fails with PreconditionFailed
63 # and breaks every release build. Point TSA at an explicit, sanitized codebase config instead.
64 enabled: true
65 configFile: $(Build.SourcesDirectory)\.config\tsaoptions.json
66 evidence:
67 enabled: false
68 git:
69 fetchDepth: -1
70 fetchTags: true
71
72 stages:
73 - template: build-stage.yml@self
74 parameters:
75 isRelease: true
76 packageVersion: ${{ iif(eq(parameters.testVersion, ''), variables['Build.SourceBranchName'], parameters.testVersion) }}
77 nugetSuffix: ${{ parameters.nugetSuffix }}
78 traceLoggingConfig: $(ReleaseTraceLoggingConfig)
79 vsoOrg: microsoft
80 vsoProject: Microsoft.WSL
81
82 - template: dcat-stage.yml@self
83
84 - template: test-stage.yml@self
85 parameters:
86 rs_prerelease_only: false
87
88 - template: flight-stage.yml@self
89 parameters:
90 publishPackage: ${{ iif(eq(parameters.testVersion, ''), true, false) }}
91 packageVersion: ${{ iif(eq(parameters.testVersion, ''), variables['Build.SourceBranchName'], parameters.testVersion) }}
92 bypassTests: ${{ parameters.bypassTests }}
93 pushToStore: ${{ parameters.pushToStore }}
94
95 - ${{ if or(eq(parameters.testVersion, ''), not(eq(parameters.nugetSuffix, ''))) }}:
96 - template: nuget-stage.yml@self
97 parameters:
98 isNightly: false