Skip to content

Commit 88e95d5

Browse files
committed
User Story 37654: Create Abstractions package
- Fixed Abstractions package versioning in official builds. - Fixed broken assembly version checks in official builds. - Removed Abstractions solution file.
1 parent 6dcb0db commit 88e95d5

File tree

8 files changed

+49
-26
lines changed

8 files changed

+49
-26
lines changed

eng/pipelines/common/templates/jobs/build-signed-package-job.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ jobs:
3939
name: GetBuildType
4040
4141
- template: ../steps/build-all-configurations-signed-dlls-step.yml@self
42-
42+
parameters:
43+
# These values are sourced from common-variables.yml.
44+
abstractionsPackageVersion: $(abstractionsPackageVersion)
45+
abstractionsAssemblyFileVersion: $(abstractionsAssemblyFileVersion)
46+
4347
- template: ../steps/code-analyze-step.yml@self
4448
parameters:
4549
analyzeType: all

eng/pipelines/common/templates/jobs/validate-signed-package-job.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,16 @@ jobs:
344344
345345
- powershell: |
346346
# Check assembly versions.
347+
#
348+
# GOTCHA: This expects the Versions.props file having XML elements in a
349+
# certain order. If the order changes, this check will fail!
350+
#
351+
# TODO: This also isn't checking the versions of the actual assemblies in
352+
# the package, so it isn't terribly useful.
347353
348354
[Xml] $versionprops = Get-Content -Path "tools/props/Versions.props"
349-
$AssemblyFileVersion = $versionprops.Project.PropertyGroup[0].AssemblyFileVersion
350-
$AssemblyVersion = $versionprops.Project.PropertyGroup[0].AssemblyVersion
355+
$AssemblyFileVersion = $versionprops.Project.PropertyGroup[1].AssemblyFileVersion
356+
$AssemblyVersion = $versionprops.Project.PropertyGroup[1].AssemblyVersion
351357
352358
if($AssemblyFileVersion -eq $AssemblyVersion)
353359
{

eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
# See the LICENSE file in the project root for more information. #
55
#################################################################################
66
parameters:
7+
8+
- name: abstractionsPackageVersion
9+
type: string
10+
11+
- name: abstractionsAssemblyFileVersion
12+
type: string
13+
714
- name: AssemblyFileVersion
815
type: string
916
default: $(AssemblyFileVersion)
@@ -47,4 +54,4 @@ steps:
4754
inputs:
4855
solution: '**/build.proj'
4956
configuration: '${{parameters.Configuration }}'
50-
msbuildArguments: '-p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAllConfigurations -p:GenerateNuget=false -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk'
57+
msbuildArguments: '-p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAllConfigurations -p:GenerateNuget=false -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk -p:AbstractionsPackageVersion=${{ parameters.abstractionsPackageVersion }} -p:AbstractionsAssemblyFileVersion=${{ parameters.abstractionsAssemblyFileVersion }}'

eng/pipelines/jobs/pack-abstractions-package-ci-job.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ jobs:
5757

5858
variables:
5959

60-
# The Abstractions solution file to use for all dotnet CLI commands.
61-
- name: solution
62-
value: src/Microsoft.Data.SqlClient.Extensions/Abstractions/Abstractions.slnx
60+
# The Abstractions project file to use for all dotnet CLI commands.
61+
- name: project
62+
value: src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj
6363

6464
# The directory where the NuGet packages will be staged before being
6565
# published as pipeline artifacts.
@@ -118,7 +118,7 @@ jobs:
118118
inputs:
119119
command: custom
120120
custom: restore
121-
projects: $(solution)
121+
projects: $(project)
122122
arguments: $(commonArguments)
123123

124124
# Build the solution.
@@ -127,7 +127,7 @@ jobs:
127127
inputs:
128128
command: custom
129129
custom: build
130-
projects: $(solution)
130+
projects: $(project)
131131
arguments: $(buildArguments) --no-restore
132132

133133
# Create the NuGet packages.
@@ -136,7 +136,7 @@ jobs:
136136
inputs:
137137
command: custom
138138
custom: pack
139-
projects: $(solution)
139+
projects: $(project)
140140
arguments: $(buildArguments) --no-build -o $(dotnetPackagesDir)
141141

142142
# Publish the NuGet packages as a named pipeline artifact.

eng/pipelines/jobs/test-abstractions-package-ci-job.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ jobs:
7676

7777
variables:
7878

79-
# The Abstractions solution file to use for all dotnet CLI commands.
80-
- name: solution
81-
value: src/Microsoft.Data.SqlClient.Extensions/Abstractions/Abstractions.slnx
79+
# The Abstractions test project file to use for all dotnet CLI commands.
80+
- name: project
81+
value: src/Microsoft.Data.SqlClient.Extensions/Abstractions/test/Abstractions.Test.csproj
8282

8383
# dotnet CLI arguments common to all commands.
8484
- name: commonArguments
@@ -141,7 +141,7 @@ jobs:
141141
inputs:
142142
command: custom
143143
custom: restore
144-
projects: $(solution)
144+
projects: $(project)
145145
arguments: $(commonArguments)
146146

147147
# Build the solution.
@@ -150,7 +150,7 @@ jobs:
150150
inputs:
151151
command: custom
152152
custom: build
153-
projects: $(solution)
153+
projects: $(project)
154154
arguments: $(buildArguments) --no-restore
155155

156156
# Run the tests for each .NET runtime.
@@ -160,7 +160,7 @@ jobs:
160160
inputs:
161161
command: custom
162162
custom: test
163-
projects: $(solution)
163+
projects: $(project)
164164
arguments: $(buildArguments) --no-build -f ${{ runtime }}
165165

166166
# Run the tests for each .NET Framework runtime.
@@ -170,5 +170,5 @@ jobs:
170170
inputs:
171171
command: custom
172172
custom: test
173-
projects: $(solution)
173+
projects: $(project)
174174
arguments: $(buildArguments) --no-build -f ${{ runtime }}

eng/pipelines/libraries/common-variables.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ variables:
2626
- name: artifactDirectory
2727
value: '$(REPOROOT)/packages'
2828

29+
# ----------------------------------------------------------------------------
30+
# Abstractions Package Versions
31+
#
32+
# These are version values that will be used by the official build. They
33+
# should be updated after each release to reflect the next release's versions.
34+
35+
# The NuGet package version for the Abstractions package.
36+
- name: abstractionsPackageVersion
37+
value: 1.0.0.$(Build.BuildNumber)
38+
39+
# The AssemblyFileVersion for all assemblies in the Abstractions package.
40+
- name: abstractionsAssemblyFileVersion
41+
value: '1.0.0.0'
42+
2943
# Update this after every release. This is used to generate the MDS NuGet package version.
3044
- name: Major
3145
value: '7'

src/Microsoft.Data.SqlClient.Extensions/Abstractions/Abstractions.slnx

Lines changed: 0 additions & 8 deletions
This file was deleted.

tools/props/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
-->
2121

2222
<!--
23-
GOTCHA: These two Assembly properties must appear in the first
23+
GOTCHA: These two Assembly properties must appear in the second
2424
<PropertyGroup> in this file due to hardcoded XML processing in:
2525
2626
eng/pipelines/common/templates/jobs/validate-signed-package-job.yml

0 commit comments

Comments
 (0)