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 
@@ -28,8 +43,15 @@ parameters:
2843    type : stepList 
2944    default : [] 
3045
46+   - name : abstractionsPackageVersion 
47+     type : string 
48+ 
49+   - name : mdsPackageVersion 
50+     type : string 
51+ 
3152jobs :
32- - job : build_nugets 
53+ - job : build_mds_akv_packages_job 
54+   displayName : Build MDS & AKV Packages 
3355
3456  pool :
3557    name : ${{parameters.poolName }} 
@@ -44,36 +66,65 @@ jobs:
4466  - ${{ if ne(parameters.prebuildSteps, '') }} :
4567    - ${{ parameters.prebuildSteps }}  #  extra steps to run before the build like downloading sni and the required configuration
4668
69+   #  If we're testing in Package mode, download the Abstractions package artifacts into packages/,
70+   #  and then setup the top-level NuGet.config to look in packages/ for local
71+   #  NuGet dependencies.
72+   - ${{ if eq(parameters.referenceType, 'Package') }} :
73+     - task : DownloadPipelineArtifact@2 
74+       displayName : Download Abstractions Package Artifact 
75+       inputs :
76+         artifactName : ${{ parameters.abstractionsArtifactName }} 
77+         targetPath : $(packagePath) 
78+     #  Note that packages/ will have been created by the above step, which is a
79+     #  pre-requisite for configuring NuGet.
80+     - template : ../steps/ci-prebuild-step.yml@self 
81+       parameters :
82+         debug : ${{ parameters.debug }} 
83+         referenceType : ${{ parameters.referenceType }} 
84+ 
4785  - template : ../steps/ci-project-build-step.yml@self 
4886    parameters :
4987      platform : ${{ parameters.platform }} 
5088      configuration : ${{ parameters.configuration }} 
89+       referenceType : ${{ parameters.referenceType }} 
5190      operatingSystem : Windows 
52-       build : all 
91+       build : MDS 
92+       abstractionsPackageVersion : ${{parameters.abstractionsPackageVersion}} 
5393
5494  - template : ../steps/generate-nuget-package-step.yml@self 
5595    parameters :
56-       NugetPackageVersion : $(NugetPackageVersion)  
96+       packageVersion : ${{ parameters.mdsPackageVersion }}  
5797      configuration : $(Configuration) 
5898      nuspecPath : ' tools/specs/Microsoft.Data.SqlClient.nuspec' 
59-       OutputDirectory : $(packagePath) 
99+       outputDirectory : $(packagePath) 
60100      generateSymbolsPackage : false 
61-       properties : ' AbstractionsPackageVersion=$(abstractionsPackageVersion)' 
62-       displayName : ' Generate NuGet package M.D.SqlClient' 
101+       referenceType : ${{ parameters.referenceType }} 
102+       properties : ' AbstractionsPackageVersion=${{ parameters.abstractionsPackageVersion }}' 
103+       displayName : ' Create MDS NuGet Package' 
104+ 
105+   - template : ../steps/ci-project-build-step.yml@self 
106+     parameters :
107+       platform : ${{ parameters.platform }} 
108+       configuration : ${{ parameters.configuration }} 
109+       referenceType : ${{ parameters.referenceType }} 
110+       operatingSystem : Windows 
111+       build : AKV 
112+       mdsPackageVersion : ${{parameters.mdsPackageVersion}} 
63113
64114  - template : ../steps/generate-nuget-package-step.yml@self 
65115    parameters :
66-       NugetPackageVersion : $(NugetPackageVersion ) 
116+       packageVersion : $(akvPackageVersion ) 
67117      configuration : $(Configuration) 
68118      nuspecPath : ' tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec' 
69-       OutputDirectory : $(packagePath) 
119+       outputDirectory : $(packagePath) 
70120      generateSymbolsPackage : false 
71-       properties : ' MdsPackageVersion=$(mdsPackageVersion)' 
121+       referenceType : ${{ parameters.referenceType }} 
122+       properties : ' MdsPackageVersion=${{ parameters.mdsPackageVersion }}' 
72123      installNuget : false 
73-       displayName : ' Generate NuGet package  AKV Provider ' 
124+       displayName : ' Create  AKV NuGet Package ' 
74125
75-   - task : PublishBuildArtifacts @1
76-     displayName : ' Publish Artifact: Artifacts ' 
126+   - task : PublishPipelineArtifact @1
127+     displayName : ' Publish Pipeline Artifact ' 
77128    inputs :
78-       PathtoPublish : $(packagePath) 
79-       ArtifactName : ${{ parameters.artifactName  }} 
129+       targetPath : $(packagePath) 
130+       artifactName : ${{ parameters.mdsArtifactName  }} 
0 commit comments