44# See the LICENSE file in the project root for more information. #
55# ################################################################################
66parameters :
7+
8+ - name : ' debug'
9+ type : boolean
10+ default : false
11+
12+ - name : referenceType
13+ type : string
14+ values :
15+ - Package
16+ - Project
17+
718 - name : poolName
819 type : string
920 default : $(ci_var_defaultPoolName)
@@ -12,9 +23,13 @@ parameters:
1223 type : string
1324 default : ADO-MMS22-SQL19
1425
15- - name : artifactName
26+ - name : abstractionsArtifactName
1627 type : string
17- default : Artifacts
28+ default : Abstractions.Artifact
29+
30+ - name : mdsArtifactName
31+ type : string
32+ default : MDS.Artifact
1833
1934 - name : platform
2035 type : string
@@ -30,8 +45,15 @@ parameters:
3045 type : stepList
3146 default : []
3247
48+ - name : abstractionsPackageVersion
49+ type : string
50+
51+ - name : mdsPackageVersion
52+ type : string
53+
3354jobs :
34- - job : build_nugets
55+ - job : build_mds_akv_packages_job
56+ displayName : Build MDS & AKV Packages
3557
3658 pool :
3759 name : ${{parameters.poolName }}
@@ -46,36 +68,65 @@ jobs:
4668 - ${{ if ne(parameters.prebuildSteps, '') }} :
4769 - ${{ parameters.prebuildSteps }} # extra steps to run before the build like downloading sni and the required configuration
4870
71+ # If we're testing in Package mode, download the Abstractions package artifacts into packages/,
72+ # and then setup the top-level NuGet.config to look in packages/ for local
73+ # NuGet dependencies.
74+ - ${{ if eq(parameters.referenceType, 'Package') }} :
75+ - task : DownloadPipelineArtifact@2
76+ displayName : Download Abstractions Package Artifact
77+ inputs :
78+ artifactName : ${{ parameters.abstractionsArtifactName }}
79+ targetPath : $(packagePath)
80+ # Note that packages/ will have been created by the above step, which is a
81+ # pre-requisite for configuring NuGet.
82+ - template : ../steps/ci-prebuild-step.yml@self
83+ parameters :
84+ debug : ${{ parameters.debug }}
85+ referenceType : ${{ parameters.referenceType }}
86+
4987 - template : ../steps/ci-project-build-step.yml@self
5088 parameters :
5189 platform : ${{ parameters.platform }}
5290 buildConfiguration : ${{ parameters.buildConfiguration }}
91+ referenceType : ${{ parameters.referenceType }}
5392 operatingSystem : Windows
54- build : all
93+ build : MDS
94+ abstractionsPackageVersion : ${{parameters.abstractionsPackageVersion}}
5595
5696 - template : ../steps/generate-nuget-package-step.yml@self
5797 parameters :
58- NugetPackageVersion : $(NugetPackageVersion)
5998 buildConfiguration : ${{ parameters.buildConfiguration }}
60- nuspecPath : ' tools/specs/Microsoft.Data.SqlClient.nuspec'
61- OutputDirectory : $(packagePath)
99+ displayName : ' Create MDS NuGet Package'
62100 generateSymbolsPackage : false
63- properties : ' AbstractionsPackageVersion=$(abstractionsPackageVersion)'
64- displayName : ' Generate NuGet package M.D.SqlClient'
101+ packageVersion : ${{ parameters.mdsPackageVersion }}
102+ nuspecPath : ' tools/specs/Microsoft.Data.SqlClient.nuspec'
103+ outputDirectory : $(packagePath)
104+ properties : ' AbstractionsPackageVersion=${{ parameters.abstractionsPackageVersion }}'
105+ referenceType : ${{ parameters.referenceType }}
106+
107+ - template : ../steps/ci-project-build-step.yml@self
108+ parameters :
109+ platform : ${{ parameters.platform }}
110+ buildConfiguration : ${{ parameters.buildConfiguration }}
111+ referenceType : ${{ parameters.referenceType }}
112+ operatingSystem : Windows
113+ build : AKV
114+ mdsPackageVersion : ${{parameters.mdsPackageVersion}}
65115
66116 - template : ../steps/generate-nuget-package-step.yml@self
67117 parameters :
68- NugetPackageVersion : $(NugetPackageVersion)
69118 buildConfiguration : ${{ parameters.buildConfiguration }}
70- nuspecPath : ' tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec'
71- OutputDirectory : $(packagePath)
119+ displayName : ' Create AKV NuGet Package'
72120 generateSymbolsPackage : false
73- properties : ' MdsPackageVersion=$(mdsPackageVersion)'
74121 installNuget : false
75- displayName : ' Generate NuGet package AKV Provider'
122+ nuspecPath : ' tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec'
123+ outputDirectory : $(packagePath)
124+ packageVersion : $(akvPackageVersion)
125+ properties : ' MdsPackageVersion=${{ parameters.mdsPackageVersion }}'
126+ referenceType : ${{ parameters.referenceType }}
76127
77- - task : PublishBuildArtifacts @1
78- displayName : ' Publish Artifact: Artifacts '
128+ - task : PublishPipelineArtifact @1
129+ displayName : ' Publish Pipeline Artifact '
79130 inputs :
80- PathtoPublish : $(packagePath)
81- ArtifactName : ${{ parameters.artifactName }}
131+ targetPath : $(packagePath)
132+ artifactName : ${{ parameters.mdsArtifactName }}
0 commit comments