3
3
trigger :
4
4
- main
5
5
- release/*
6
- - d17-*
7
6
- dependabot/*
8
- - dev/*
9
7
10
8
pr :
11
9
branches :
12
10
include :
13
11
- main
14
12
- release/*
15
- - d17-*
16
13
paths :
17
14
exclude :
18
15
- README.md
19
16
- Documentation/*
20
17
21
- parameters :
22
- - name : ApiScanSourceBranch
23
- default : ' refs/heads/main'
24
-
25
18
# Global variables
26
19
variables :
27
20
RunningOnCI : true
28
21
Build.Configuration : Release
29
22
DotNetCoreVersion : 8.0.303
30
23
DotNetTargetFramework : net8.0
31
24
NetCoreTargetFrameworkPathSuffix : -$(DotNetTargetFramework)
32
- 1ESWindowsPool : AzurePipelines-EO
33
- 1ESWindowsImage : AzurePipelinesWindows2022compliant
34
- 1ESMacPool : Azure Pipelines
35
- 1ESMacImage : macOS-13
36
- DisablePipelineConfigDetector : true
25
+ HostedPoolName : Azure Pipelines
26
+ HostedWinImage : windows-2022
27
+ HostedMacImage : macOS-14
37
28
38
29
jobs :
39
30
- job : windows_dotnet_build
40
31
displayName : Windows - .NET
41
32
pool :
42
- name : $(1ESWindowsPool)
43
- demands :
44
- - ImageOverride -equals $(1ESWindowsImage)
45
- variables :
46
- VSINSTALLDIR : C:\Program Files\Microsoft Visual Studio\2022\Enterprise\
47
- Codeql.Enabled : true
33
+ name : $(HostedPoolName)
34
+ vmImage : $(HostedWinImage)
48
35
timeoutInMinutes : 60
49
36
workspace :
50
37
clean : all
76
63
- job : mac_dotnet_build
77
64
displayName : Mac - .NET
78
65
pool :
79
- name : $(1ESMacPool )
80
- vmImage : $(1ESMacImage )
66
+ name : $(HostedPoolName )
67
+ vmImage : $(HostedMacImage )
81
68
timeoutInMinutes : 20
82
69
workspace :
83
70
clean : all
@@ -98,126 +85,3 @@ jobs:
98
85
- template : templates\fail-on-dirty-tree.yaml
99
86
100
87
- template : templates\fail-on-issue.yaml
101
-
102
-
103
- - job : api_scan
104
- displayName : API Scan
105
- dependsOn : windows_dotnet_build
106
- condition : and(eq(dependencies.windows_dotnet_build.result, 'Succeeded'), eq(variables['Build.SourceBranch'], '${{ parameters.ApiScanSourceBranch }}'))
107
- pool :
108
- name : MAUI-1ESPT
109
- demands : ImageOverride -equals 1ESPT-Windows2022
110
- timeoutInMinutes : 480
111
- workspace :
112
- clean : all
113
- steps :
114
- - task : DownloadPipelineArtifact@2
115
- displayName : Download build artifacts
116
- inputs :
117
- artifactName : artifacts
118
- downloadPath : $(Build.SourcesDirectory)
119
-
120
- # ## Copy .dll, .exe, .pdb files for APIScan
121
- - task : CopyFiles@2
122
- displayName : Collect Files for APIScan
123
- inputs :
124
- Contents : |
125
- $(Build.SourcesDirectory)\$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)\**\?(*.dll|*.exe|*.pdb)
126
- !$(Build.SourcesDirectory)\**\jnimarshalmethod-gen.*
127
- !$(Build.SourcesDirectory)\**\Mono.CSharp.dll
128
- !$(Build.SourcesDirectory)\**\SgmlReader.exe
129
- !$(Build.SourcesDirectory)\**\win-*\java-interop.dll
130
- TargetFolder : $(Build.StagingDirectory)\apiscan
131
- OverWrite : true
132
- flattenFolders : true
133
-
134
- - task : APIScan@2
135
- displayName : Run APIScan
136
- inputs :
137
- softwareFolder : $(Build.StagingDirectory)\apiscan
138
- symbolsFolder : ' SRV*http://symweb;$(Build.StagingDirectory)\apiscan'
139
- softwareName : $(ApiScanName)
140
- softwareVersionNum : $(Build.SourceBranchName)-$(Build.SourceVersion)$(System.JobAttempt)
141
- isLargeApp : true
142
- toolVersion : Latest
143
- env :
144
- AzureServicesAuthConnectionString : runAs=App;AppId=$(ApiScanMAUI1ESPTManagedId)
145
-
146
- - task : SdtReport@2
147
- displayName : Guardian Export - Security Report
148
- inputs :
149
- GdnExportAllTools : false
150
- GdnExportGdnToolApiScan : true
151
- GdnExportOutputSuppressionFile : source.gdnsuppress
152
-
153
- - task : PublishSecurityAnalysisLogs@3
154
- displayName : Publish Guardian Artifacts
155
- inputs :
156
- ArtifactName : APIScan Logs
157
- ArtifactType : Container
158
- AllTools : false
159
- APIScan : true
160
- ToolLogsNotFoundAction : Warning
161
-
162
- - task : PostAnalysis@2
163
- displayName : Fail Build on Guardian Issues
164
- inputs :
165
- GdnBreakAllTools : false
166
- GdnBreakGdnToolApiScan : true
167
-
168
-
169
- - job : OneLocBuild
170
- displayName : OneLocBuild
171
- condition : and(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
172
- pool :
173
- name : AzurePipelines-EO
174
- demands :
175
- - ImageOverride -equals 1ESPT-Windows2022
176
- timeoutInMinutes : 30
177
- variables :
178
- - group : Xamarin-Secrets
179
- workspace :
180
- clean : all
181
- steps :
182
- - checkout : self
183
- clean : true
184
-
185
- # https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-security-configuration/configuration-guides/pat-burndown-guidance#authentication-from-pipelines
186
- # Requires Azure client 2.x
187
- - task : AzureCLI@2
188
- displayName : ' Set AzDO.OneLocBuildToken'
189
- enabled : true
190
- inputs :
191
- azureSubscription : ' VSEng-AzureDevOps-ceapex-OneLocBuild' # Azure DevOps service connection
192
- scriptType : ' pscore'
193
- scriptLocation : ' inlineScript'
194
- inlineScript : |
195
- # if this fails, check out this bash script that includes diagnostics:
196
- # https://gist.github.com/johnterickson/19f80a3e969e39f1000d118739176e62
197
- # Note that the resource is specified to limit the token to Azure DevOps
198
- $token = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
199
- Write-Host "##vso[task.setvariable variable=AzDO.OneLocBuildToken;issecret=true]${token}"
200
-
201
- - task : OneLocBuild@2
202
- displayName : OneLocBuild
203
- env :
204
- SYSTEM_ACCESSTOKEN : $(System.AccessToken)
205
- inputs :
206
- locProj : Localize/LocProject.json
207
- outDir : $(Build.StagingDirectory)
208
- packageSourceAuth : patAuth
209
- patVariable : $(AzDO.OneLocBuildToken)
210
- isCreatePrSelected : true
211
- repoType : gitHub
212
- gitHubPatVariable : $(github--pat--vs-mobiletools-engineering-service2)
213
- prSourceBranchPrefix : locpr
214
- isShouldReusePrSelected : true
215
- isAutoCompletePrSelected : false
216
- isUseLfLineEndingsSelected : true
217
-
218
- - task : PublishBuildArtifacts@1
219
- displayName : Publish Localization Files
220
- inputs :
221
- PathtoPublish : $(Build.StagingDirectory)/loc
222
- ArtifactName : Loc
223
- condition : succeededOrFailed()
0 commit comments