forked from dotnet/winforms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
196 lines (178 loc) · 6.05 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# Parameters ARE available in template expressions, and parameters can have default values,
# so they can be used to control yaml flow.
# trigger ci builds for completed checkins into main and any release branches
trigger:
branches:
include:
- main
- release/*
- internal/release/*
- internal/experimental/*
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
# trigger ci builds on pull requests into main and any release branches
pr:
autoCancel: true
branches:
include:
- main
- vnext
- release/*
- internal/release/*
- internal/experimental/*
- feature/win32
- feature/9.0
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
variables:
- name: TeamName
value: DotNetCore
# clean the local repo on the build agents
- name: Build.Repository.Clean
value: true
- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}:
- name: PostBuildSign
value: false
- ${{ else }}:
- name: PostBuildSign
value: true
- name: EnableLoc
value: ${{ contains(variables['Build.SourceBranch'], 'main') }}
- name: NativeToolsOnMachine
value: true
- name: isPublic
value: ${{ eq(variables['System.TeamProject'], 'public') }}
- name: isPR
value: ${{ eq(variables['Build.Reason'], 'PullRequest')}}
# used for post-build phases, internal builds only
- ${{ if and(ne(variables['isPublic'], 'true'), ne(variables['isPR'], 'true')) }}:
- group: DotNet-Winforms-SDLValidation-Params
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
- name: _InternalRuntimeDownloadArgs
value: ''
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNetBuilds storage account read tokens
- group: AzureDevOps-Artifact-Feeds-Pats
- name: _InternalRuntimeDownloadArgs
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
# Produce test-signed build for PR and Public builds
- ${{ if or(eq(variables['isPublic'], 'true'), eq(variables['isPR'], 'true')) }}:
# needed for darc (dependency flow) publishing
- name: _PublishArgs
value: ''
- name: _OfficialBuildIdArgs
value: ''
# needed for signing
- name: _SignType
value: test
- name: _SignArgs
value: ''
- name: _Sign
value: false
# Set up non-PR build from internal project
- ${{ if and(ne(variables['isPublic'], 'true'), ne(variables['isPR'], 'true')) }}:
# needed for darc (dependency flow) publishing
- name: _PublishArgs
value: >-
/p:DotNetPublishUsingPipelines=true
- name: _OfficialBuildIdArgs
value: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
# needed for signing
- name: _SignType
value: real
- name: _SignArgs
value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) /p:Sign=$(_Sign)
- name: _Sign
value: true
stages:
- stage: Build
jobs:
# Windows x64
- template: /eng/pipelines/build.yml
parameters:
name: Windows_x64
targetArchitecture: x64
skipTests: $(SkipTests)
# Windows x86
- template: /eng/pipelines/build.yml
parameters:
name: Windows_x86
targetArchitecture: x86
skipTests: $(SkipTests)
# Windows arm64
- template: /eng/pipelines/build.yml
parameters:
name: Windows_arm64
targetArchitecture: arm64
skipTests: $(SkipTests)
- ${{ if and(eq(variables['EnableLoc'], 'true'), ne(variables['isPublic'], 'true'), ne(variables['isPR'], 'true')) }}:
- stage: OneLocBuild
displayName: Publish localizable content to OneLocBuild
jobs:
- template: /eng/common/templates/job/onelocbuild.yml
parameters:
MirrorRepo: winforms
UseCheckedInLocProjectJson: true
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-WINFORMS'
- ${{ if and(ne(variables['isPublic'], 'true'), ne(variables['isPR'], 'true')) }}:
- stage: PublishAssetRegistry
displayName: Publish to Build Asset Registry
dependsOn: Build
variables:
- template: /eng/common/templates/variables/pool-providers.yml
jobs:
# Publish to Build Asset Registry in order to generate the ReleaseConfigs artifact.
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
publishUsingPipelines: true
pool:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals windows.vs2022preview.amd64
# Copied from the arcade repo and modified for winforms
- ${{ if and(ne(variables['isPublic'], 'true'), ne(variables['isPR'], 'true')) }}:
- template: /eng/common/templates/post-build/post-build.yml
parameters:
validateDependsOn: PublishAssetRegistry
publishingInfraVersion: 3
enableSymbolValidation: false
enableSigningValidation: false
enableNugetValidation: false
enableSourceLinkValidation: false
# these param values come from the DotNet-Winforms-SDLValidation-Params azdo variable group
SDLValidationParameters:
enable: false
params: ' -SourceToolsList $(_TsaSourceToolsList)
-TsaInstanceURL $(_TsaInstanceURL)
-TsaProjectName $(_TsaProjectName)
-TsaNotificationEmail $(_TsaNotificationEmail)
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
-TsaBugAreaPath $(_TsaBugAreaPath)
-TsaIterationPath $(_TsaIterationPath)
-TsaRepositoryName $(_TsaRepositoryName)
-TsaCodebaseName $(_TsaCodebaseName)
-TsaOnboard $(_TsaOnboard)
-TsaPublish $(_TsaPublish)'