-
Notifications
You must be signed in to change notification settings - Fork 329
Expand file tree
/
Copy pathbuild-abstractions-package-ci-stage.yml
More file actions
170 lines (146 loc) · 5.78 KB
/
build-abstractions-package-ci-stage.yml
File metadata and controls
170 lines (146 loc) · 5.78 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
################################################################################
# Licensed to the .NET Foundation under one or more agreements. The .NET
# Foundation licenses this file to you under the MIT license. See the LICENSE
# file in the project root for more information.
################################################################################
# This stage builds the Abstractions package, runs tests, and publishes the
# resulting NuGet packages as pipeline artifacts.
#
# The NuGet packages have the following properties:
#
# Name: Microsoft.Data.SqlClient.Extensions.Abstractions
# Version: <abstractionsPackageVersion> (from parameter)
#
# The following NuGet packages are published:
#
# Microsoft.Data.SqlClient.Extensions.Abstractions.<version>.nupkg
# Microsoft.Data.SqlClient.Extensions.Abstractions.<version>.snupkg (symbols)
#
# The packages are published to pipeline artifacts with the name specified by
# the abstractionsArtifactsName parameter.
#
# This template defines a stage named 'build_abstractions_package_stage' that
# can be depended on by downstream stages.
parameters:
# The name of the pipeline artifacts to publish.
- name: abstractionsArtifactsName
type: string
default: Abstractions.Artifacts
# The assembly file version to stamp into the DLLs.
- name: abstractionsAssemblyFileVersion
type: string
# The version to apply to the NuGet package and DLLs.
- name: abstractionsPackageVersion
type: string
# Additional stages we depend on, if any.
- name: additionalDependsOn
type: object
default: []
# The type of build to produce (Release or Debug)
- name: buildConfiguration
type: string
default: Release
values:
- Release
- Debug
# True to emit debug information and steps.
- name: debug
type: boolean
default: false
# The verbosity level for the dotnet CLI commands.
- name: dotnetVerbosity
type: string
default: normal
values:
- quiet
- minimal
- normal
- detailed
- diagnostic
# The name of the Logging pipeline artifacts to download.
#
# This is used when the referenceType is 'Package'.
- name: loggingArtifactsName
type: string
default: Logging.Artifacts
# The Logging package version to depend on.
#
# This is used when the referenceType is 'Package'.
- name: loggingPackageVersion
type: string
default: ''
# The C# project reference type to use when building and packing the packages.
- name: referenceType
type: string
default: Project
values:
# Reference sibling packages as NuGet packages.
- Package
# Reference sibling packages as C# projects.
- Project
stages:
- stage: build_abstractions_package_stage
displayName: Build Abstractions Package
dependsOn:
- secrets_stage
- ${{ each dep in parameters.additionalDependsOn }}:
- ${{ dep }}
jobs:
# ------------------------------------------------------------------------
# Build and test on Linux.
- template: /eng/pipelines/jobs/test-abstractions-package-ci-job.yml@self
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
displayNamePrefix: Linux
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
jobNameSuffix: linux
netFrameworkRuntimes: []
netRuntimes: [net8.0, net9.0, net10.0]
poolName: Azure Pipelines
vmImage: ubuntu-latest
# ------------------------------------------------------------------------
# Build and test on Windows
- template: /eng/pipelines/jobs/test-abstractions-package-ci-job.yml@self
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
displayNamePrefix: Win
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
jobNameSuffix: windows
netFrameworkRuntimes: [net462]
netRuntimes: [net8.0, net9.0, net10.0]
poolName: Azure Pipelines
vmImage: windows-latest
# ------------------------------------------------------------------------
# Build and test on macOS.
- template: /eng/pipelines/jobs/test-abstractions-package-ci-job.yml@self
parameters:
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
displayNamePrefix: macOS
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
jobNameSuffix: macos
netFrameworkRuntimes: []
netRuntimes: [net8.0, net9.0, net10.0]
poolName: Azure Pipelines
vmImage: macos-latest
# ------------------------------------------------------------------------
# Create and publish the NuGet package.
- template: /eng/pipelines/jobs/pack-abstractions-package-ci-job.yml@self
parameters:
abstractionsArtifactsName: ${{ parameters.abstractionsArtifactsName }}
abstractionsAssemblyFileVersion: ${{ parameters.abstractionsAssemblyFileVersion }}
abstractionsPackageVersion: ${{ parameters.abstractionsPackageVersion }}
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
dependsOn:
# We depend on all of the test jobs to ensure the tests pass before
# producing the NuGet package.
- test_abstractions_package_job_linux
- test_abstractions_package_job_windows
- test_abstractions_package_job_macos
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
loggingArtifactsName: ${{ parameters.loggingArtifactsName }}
loggingPackageVersion: ${{ parameters.loggingPackageVersion }}
referenceType: ${{ parameters.referenceType }}