33trigger :
44 - main
55 - release/*
6- - d17-*
76 - dependabot/*
8- - dev/*
97
108pr :
119 branches :
1210 include :
1311 - main
1412 - release/*
15- - d17-*
1613 paths :
1714 exclude :
1815 - README.md
1916 - Documentation/*
2017
21- parameters :
22- - name : ApiScanSourceBranch
23- default : ' refs/heads/main'
24-
2518# Global variables
2619variables :
2720 RunningOnCI : true
2821 Build.Configuration : Release
2922 DotNetCoreVersion : 8.0.303
3023 DotNetTargetFramework : net8.0
3124 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
3728
3829jobs :
3930- job : windows_dotnet_build
4031 displayName : Windows - .NET
4132 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)
4835 timeoutInMinutes : 60
4936 workspace :
5037 clean : all
7663- job : mac_dotnet_build
7764 displayName : Mac - .NET
7865 pool :
79- name : $(1ESMacPool )
80- vmImage : $(1ESMacImage )
66+ name : $(HostedPoolName )
67+ vmImage : $(HostedMacImage )
8168 timeoutInMinutes : 20
8269 workspace :
8370 clean : all
@@ -98,126 +85,3 @@ jobs:
9885 - template : templates\fail-on-dirty-tree.yaml
9986
10087 - 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