This repository was archived by the owner on Jul 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathazure-pipelines.yaml
More file actions
198 lines (172 loc) · 5.18 KB
/
Copy pathazure-pipelines.yaml
File metadata and controls
198 lines (172 loc) · 5.18 KB
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
197
198
# Java.Interop Pipelines
trigger:
- main
- d16-*
- d17-*
pr:
branches:
include:
- main
- d16-*
- d17-*
paths:
exclude:
- README.md
- Documentation/*
parameters:
- name: ApiScanSourceBranch
default: 'refs/heads/main'
# Global variables
variables:
RunningOnCI: true
Build.Configuration: Release
DotNetCoreVersion: 8.x
DotNetTargetFramework: net8.0
NetCoreTargetFrameworkPathSuffix: -$(DotNetTargetFramework)
1ESWindowsPool: AzurePipelines-EO
1ESWindowsImage: AzurePipelinesWindows2022compliant
1ESMacPool: Azure Pipelines
1ESMacImage: internal-macos-11
DisablePipelineConfigDetector: true
jobs:
- job: windows_dotnet_build
displayName: Windows - .NET
pool:
name: $(1ESWindowsPool)
demands:
- ImageOverride -equals $(1ESWindowsImage)
variables:
VSINSTALLDIR: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\
Codeql.Enabled: true
timeoutInMinutes: 60
workspace:
clean: all
steps:
- checkout: self
submodules: recursive
- template: templates\install-dependencies.yaml
- template: templates\core-build.yaml
- template: templates\core-tests.yaml
parameters:
runNativeDotnetTests: true
nativeAotRid: win-x64
platformName: .NET - Windows
- template: templates\fail-on-issue.yaml
- task: PublishPipelineArtifact@1
displayName: Publish build artifacts
inputs:
artifactName: artifacts
targetPath: bin
condition: succeededOrFailed()
- job: mac_dotnet_build
displayName: Mac - .NET
pool:
name: $(1ESMacPool)
vmImage: $(1ESMacImage)
timeoutInMinutes: 20
workspace:
clean: all
steps:
- checkout: self
submodules: recursive
- template: templates\install-dependencies.yaml
- template: templates\core-build.yaml
- template: templates\core-tests.yaml
parameters:
runNativeTests: true
nativeAotRid: osx-x64
platformName: .NET - MacOS
- template: templates\fail-on-issue.yaml
- job: api_scan
displayName: API Scan
dependsOn: windows_dotnet_build
condition: and(eq(dependencies.windows_dotnet_build.result, 'Succeeded'), eq(variables['Build.SourceBranch'], '${{ parameters.ApiScanSourceBranch }}'))
pool:
name: Azure Pipelines
vmImage: windows-2022
timeoutInMinutes: 480
workspace:
clean: all
steps:
- task: DownloadPipelineArtifact@2
displayName: Download build artifacts
inputs:
artifactName: artifacts
downloadPath: $(Build.SourcesDirectory)
### Copy .dll, .exe, .pdb files for APIScan
- task: CopyFiles@2
displayName: Collect Files for APIScan
inputs:
Contents: |
$(Build.SourcesDirectory)\$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)\**\?(*.dll|*.exe|*.pdb)
!$(Build.SourcesDirectory)\**\jnimarshalmethod-gen.*
!$(Build.SourcesDirectory)\**\Mono.CSharp.dll
!$(Build.SourcesDirectory)\**\SgmlReader.exe
!$(Build.SourcesDirectory)\**\win-*\java-interop.dll
TargetFolder: $(Build.StagingDirectory)\apiscan
OverWrite: true
flattenFolders: true
- task: APIScan@2
displayName: Run APIScan
inputs:
softwareFolder: $(Build.StagingDirectory)\apiscan
symbolsFolder: 'SRV*http://symweb;$(Build.StagingDirectory)\apiscan'
softwareName: $(ApiScanName)
softwareVersionNum: $(Build.SourceBranchName)-$(Build.SourceVersion)$(System.JobAttempt)
isLargeApp: true
toolVersion: Latest
env:
AzureServicesAuthConnectionString: runAs=App;AppId=$(ApiScanClientId);TenantId=$(ApiScanTenant);AppKey=$(ApiScanSecret)
- task: SdtReport@2
displayName: Guardian Export - Security Report
inputs:
GdnExportAllTools: false
GdnExportGdnToolApiScan: true
GdnExportOutputSuppressionFile: source.gdnsuppress
- task: PublishSecurityAnalysisLogs@3
displayName: Publish Guardian Artifacts
inputs:
ArtifactName: APIScan Logs
ArtifactType: Container
AllTools: false
APIScan: true
ToolLogsNotFoundAction: Warning
- task: PostAnalysis@2
displayName: Fail Build on Guardian Issues
inputs:
GdnBreakAllTools: false
GdnBreakGdnToolApiScan: true
- job: OneLocBuild
displayName: OneLocBuild
condition: and(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
pool: VSEngSS-MicroBuild2022-1ES
timeoutInMinutes: 30
variables:
- group: Xamarin-Secrets
workspace:
clean: all
steps:
- checkout: self
clean: true
- task: OneLocBuild@2
displayName: OneLocBuild
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
locProj: Localize/LocProject.json
outDir: $(Build.StagingDirectory)
packageSourceAuth: patAuth
patVariable: $(OneLocBuild--PAT)
isCreatePrSelected: true
repoType: gitHub
gitHubPatVariable: $(github--pat--vs-mobiletools-engineering-service2)
prSourceBranchPrefix: locpr
isShouldReusePrSelected: true
isAutoCompletePrSelected: false
isUseLfLineEndingsSelected: true
- task: PublishBuildArtifacts@1
displayName: Publish Localization Files
inputs:
PathtoPublish: $(Build.StagingDirectory)/loc
ArtifactName: Loc
condition: succeededOrFailed()