forked from OData/AspNetCoreOData
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure_pipelines.yml
115 lines (113 loc) · 4.82 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
trigger:
branches:
include:
- main
- dev-9.x
pr:
- main
- dev-9.x
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
name: $(Date:yyyyMMdd).$(Rev:r)
variables:
- name: __NugetSecurityAnalysisWarningLevel__
value: none
- name: BuildConfiguration
value: release
- name: BuildPlatform
value: anycpu
- name: ProductBinPath
value: $(Build.SourcesDirectory)\bin\$(BuildPlatform)\$(BuildConfiguration)
- name: runCodesignValidationInjection
value: false
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: MSSecurity-1ES-Build-Agents-Pool
image: MSSecurity-1ES-Windows-2022
os: windows
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: build
jobs:
- job: Main
displayName: Main Build
timeoutInMinutes: 120
steps:
- checkout: self
fetchTags: false
- task: NuGetToolInstaller@1
displayName: Use NuGet >=5.2.0
inputs:
versionSpec: '>=5.2.0'
checkLatest: true
- task: UseDotNet@2
displayName: Use .NET Core sdk 8.x
inputs:
version: 8.x
includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: build Microsoft.AspNetCore.OData
inputs:
projects: $(Build.SourcesDirectory)\src\Microsoft.AspNetCore.OData\Microsoft.AspNetCore.OData.csproj
arguments: --configuration $(BuildConfiguration) --no-incremental
- task: DotNetCoreCLI@2
displayName: build Microsoft.AspNetCore.OData.NewtonsoftJson
inputs:
projects: $(Build.SourcesDirectory)\src\Microsoft.AspNetCore.OData.NewtonsoftJson\Microsoft.AspNetCore.OData.NewtonsoftJson.csproj
arguments: --configuration $(BuildConfiguration) --no-incremental
- task: DotNetCoreCLI@2
displayName: Build UT(Microsoft.AspNetCore.OData.Tests)
inputs:
projects: $(Build.SourcesDirectory)\test\Microsoft.AspNetCore.OData.Tests\Microsoft.AspNetCore.OData.Tests.csproj
arguments: --configuration $(BuildConfiguration) --no-incremental
- task: DotNetCoreCLI@2
displayName: Build UT(Microsoft.AspNetCore.OData.NewtonsoftJson.Tests)
inputs:
projects: $(Build.SourcesDirectory)\test\Microsoft.AspNetCore.OData.NewtonsoftJson.Tests\Microsoft.AspNetCore.OData.NewtonsoftJson.Tests.csproj
arguments: --configuration $(BuildConfiguration) --no-incremental
- task: DotNetCoreCLI@2
displayName: Build E2E(Microsoft.AspNetCore.OData.E2E.Tests)
inputs:
projects: $(Build.SourcesDirectory)\test\Microsoft.AspNetCore.OData.E2E.Tests\Microsoft.AspNetCore.OData.E2E.Tests.csproj
arguments: --configuration $(BuildConfiguration) --no-incremental
- task: DotNetCoreCLI@2
displayName: Unit Tests (Microsoft.AspNetCore.OData.Tests)
inputs:
command: test
projects: $(Build.SourcesDirectory)\test\Microsoft.AspNetCore.OData.Tests\Microsoft.AspNetCore.OData.Tests.csproj
arguments: --configuration $(BuildConfiguration) --no-build --collect "XPlat Code coverage"
- task: DotNetCoreCLI@2
displayName: Unit Tests (Microsoft.AspNetCore.OData.NewtonsoftJson.Tests)
inputs:
command: test
projects: $(Build.SourcesDirectory)\test\Microsoft.AspNetCore.OData.NewtonsoftJson.Tests\Microsoft.AspNetCore.OData.NewtonsoftJson.Tests.csproj
arguments: --configuration $(BuildConfiguration) --no-build
- task: DotNetCoreCLI@2
displayName: E2E Tests (Microsoft.AspNetCore.OData.E2E.Tests)
inputs:
command: test
projects: $(Build.SourcesDirectory)\test\Microsoft.AspNetCore.OData.E2E.Tests\Microsoft.AspNetCore.OData.E2E.Tests.csproj
arguments: --configuration $(BuildConfiguration) --no-build -l "console;verbosity=detailed"
- task: CmdLine@2
displayName: Install ReportGenerator tool for code coverage
inputs:
script: dotnet tool install --global dotnet-reportgenerator-globaltool --version 4.5.8
- task: CmdLine@2
displayName: Create code coverage report
inputs:
script: reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/coverlet/reports -reporttypes:"Cobertura"
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage '
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(Build.SourcesDirectory)/coverlet/reports/Cobertura.xml