-
Notifications
You must be signed in to change notification settings - Fork 315
Abstractions Package - Pipeline Changes #3628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/azure-split
Are you sure you want to change the base?
Changes from 2 commits
181aa0c
7c14e0e
dc7ace3
8b80680
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,10 @@ jobs: | |
variables: | ||
- template: ../../../libraries/variables.yml@self | ||
- ${{ if parameters.isPreview }}: | ||
- name: NugetPackageVersion | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The identifier There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also eschewed using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! The variable use at such a deep nesting level was one of my biggest complaints about how the pipelines were written before. |
||
value: $(PreviewNugetPackageVersion) | ||
- name: abstrationsPackageVersion | ||
value: $(abstractionsPackagePreviewVersion) | ||
- name: mdsPackageVersion | ||
value: $(previewMdsPackageVersion) | ||
|
||
steps: | ||
- script: SET | ||
|
@@ -37,20 +39,43 @@ jobs: | |
- powershell: | | ||
Write-Host "##vso[task.setvariable variable=CDP_BUILD_TYPE_COPY;isOutput=true]$($env:CDP_BUILD_TYPE)" | ||
name: GetBuildType | ||
|
||
- template: ../steps/build-all-configurations-signed-dlls-step.yml@self | ||
|
||
|
||
# Build our tooling, which is required by the analysis step below, but | ||
# shouldn't be analyzed itself. | ||
- task: MSBuild@1 | ||
displayName: 'Build Tooling' | ||
inputs: | ||
solution: '**/build.proj' | ||
configuration: $(Configuration) | ||
msbuildArguments: -t:BuildTools | ||
|
||
# GOTCHA: This analysis step must run _before_ the build (below) step because | ||
# it builds DLLs that would otherwise clobber the properly-versioned DLLs from | ||
# the build step! | ||
- template: ../steps/code-analyze-step.yml@self | ||
parameters: | ||
analyzeType: all | ||
|
||
- template: ../steps/build-all-configurations-signed-dlls-step.yml@self | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The analysis step clobbers the versioned DLLs from the build step, so I re-ordered those steps. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @paulmedynski - Verify that the Roslyn analysis results aren't clobbered by the build. |
||
parameters: | ||
# These values are sourced from common-variables.yml. | ||
configuration: $(Configuration) | ||
abstractionsPackageVersion: $(abstractionsPackageVersion) | ||
abstractionsAssemblyFileVersion: $(abstractionsAssemblyFileVersion) | ||
mdsPackageVersion: $(mdsPackageVersion) | ||
mdsAssemblyFileVersion: $(mdsAssemblyFileVersion) | ||
|
||
- template: ../steps/esrp-code-signing-step.yml@self | ||
parameters: | ||
artifactType: dll | ||
|
||
- template: ../steps/generate-nuget-package-step.yml@self | ||
parameters: | ||
OutputDirectory: $(artifactDirectory) | ||
nuspecPath: $(nuspecPath) | ||
packageVersion: $(mdsPackageVersion) | ||
outputDirectory: $(artifactDirectory) | ||
displayName: 'Create MDS NuGet Package' | ||
referenceType: Package | ||
properties: 'AbstractionsPackageVersion=$(abstractionsPackageVersion)' | ||
|
||
- template: ../steps/esrp-code-signing-step.yml@self | ||
|
@@ -65,4 +90,4 @@ jobs: | |
- template: ../steps/publish-symbols-step.yml@self | ||
parameters: | ||
publishSymbols: ${{ parameters['PublishSymbols'] }} | ||
symbolsArtifactName: mds_symbols_$(System.TeamProject)_$(Build.Repository.Name)_$(Build.SourceBranchName)_$(NuGetPackageVersion)_$(System.TimelineId) | ||
symbolsArtifactName: mds_symbols_$(System.TeamProject)_$(Build.Repository.Name)_$(Build.SourceBranchName)_$(mdsPackageVersion)_$(System.TimelineId) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,17 @@ | |
# See the LICENSE file in the project root for more information. # | ||
################################################################################# | ||
parameters: | ||
|
||
- name: 'debug' | ||
type: boolean | ||
default: false | ||
|
||
- name: referenceType | ||
type: string | ||
values: | ||
- Package | ||
- Project | ||
|
||
- name: poolName | ||
type: string | ||
default: $(ci_var_defaultPoolName) | ||
|
@@ -12,9 +23,13 @@ parameters: | |
type: string | ||
default: ADO-MMS22-SQL19 | ||
|
||
- name: artifactName | ||
- name: abstractionsArtifactName | ||
type: string | ||
default: Artifacts | ||
default: Abstractions.Artifact | ||
|
||
- name: mdsArtifactName | ||
type: string | ||
default: MDS.Artifact | ||
|
||
- name: platform | ||
type: string | ||
|
@@ -28,8 +43,15 @@ parameters: | |
type: stepList | ||
default: [] | ||
|
||
- name: abstractionsPackageVersion | ||
type: string | ||
|
||
- name: mdsPackageVersion | ||
type: string | ||
|
||
jobs: | ||
- job: build_nugets | ||
- job: build_mds_akv_packages_job | ||
displayName: Build MDS & AKV Packages | ||
|
||
pool: | ||
name: ${{parameters.poolName }} | ||
|
@@ -44,36 +66,65 @@ jobs: | |
- ${{ if ne(parameters.prebuildSteps, '') }}: | ||
- ${{ parameters.prebuildSteps }} # extra steps to run before the build like downloading sni and the required configuration | ||
|
||
# If we're testing in Package mode, download the Abstractions package artifacts into packages/, | ||
# and then setup the top-level NuGet.config to look in packages/ for local | ||
# NuGet dependencies. | ||
- ${{ if eq(parameters.referenceType, 'Package') }}: | ||
- task: DownloadPipelineArtifact@2 | ||
displayName: Download Abstractions Package Artifact | ||
inputs: | ||
artifactName: ${{ parameters.abstractionsArtifactName }} | ||
targetPath: $(packagePath) | ||
# Note that packages/ will have been created by the above step, which is a | ||
# pre-requisite for configuring NuGet. | ||
- template: ../steps/ci-prebuild-step.yml@self | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It turns out that CI-SqlClient-Package runs weren't building the driver in Package mode. They were building the driver in Project mode, and then building the tests in Package mode. I fixed that to use Package mode everywhere. This helps find problems with Package mode before they hit dotnet-sqlclient-official. You will see |
||
parameters: | ||
debug: ${{ parameters.debug }} | ||
referenceType: ${{ parameters.referenceType }} | ||
|
||
- template: ../steps/ci-project-build-step.yml@self | ||
parameters: | ||
platform: ${{ parameters.platform }} | ||
configuration: ${{ parameters.configuration }} | ||
referenceType: ${{ parameters.referenceType }} | ||
operatingSystem: Windows | ||
build: all | ||
build: MDS | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We now build/package MDS separately from AKV, since AKV needs an MDS package in orderr to build in Package mode. |
||
abstractionsPackageVersion: ${{parameters.abstractionsPackageVersion}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't bother making these Abstractions package version parameters conditional on Project vs Package reference type. IMO those two CI pipelines are almost different enough that sharing templates may be more trouble than it's worth. We will do better with the fancy new pipelines. |
||
|
||
- template: ../steps/generate-nuget-package-step.yml@self | ||
parameters: | ||
NugetPackageVersion: $(NugetPackageVersion) | ||
packageVersion: ${{ parameters.mdsPackageVersion }} | ||
configuration: $(Configuration) | ||
nuspecPath: 'tools/specs/Microsoft.Data.SqlClient.nuspec' | ||
OutputDirectory: $(packagePath) | ||
outputDirectory: $(packagePath) | ||
generateSymbolsPackage: false | ||
properties: 'AbstractionsPackageVersion=$(abstractionsPackageVersion)' | ||
displayName: 'Generate NuGet package M.D.SqlClient' | ||
referenceType: ${{ parameters.referenceType }} | ||
properties: 'AbstractionsPackageVersion=${{ parameters.abstractionsPackageVersion }}' | ||
displayName: 'Create MDS NuGet Package' | ||
|
||
- template: ../steps/ci-project-build-step.yml@self | ||
parameters: | ||
platform: ${{ parameters.platform }} | ||
configuration: ${{ parameters.configuration }} | ||
referenceType: ${{ parameters.referenceType }} | ||
operatingSystem: Windows | ||
build: AKV | ||
mdsPackageVersion: ${{parameters.mdsPackageVersion}} | ||
|
||
- template: ../steps/generate-nuget-package-step.yml@self | ||
parameters: | ||
NugetPackageVersion: $(NugetPackageVersion) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MDS and AKV package versions are now independent in CI builds. |
||
packageVersion: $(akvPackageVersion) | ||
configuration: $(Configuration) | ||
nuspecPath: 'tools/specs/add-ons/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.nuspec' | ||
OutputDirectory: $(packagePath) | ||
outputDirectory: $(packagePath) | ||
generateSymbolsPackage: false | ||
properties: 'MdsPackageVersion=$(mdsPackageVersion)' | ||
referenceType: ${{ parameters.referenceType }} | ||
properties: 'MdsPackageVersion=${{ parameters.mdsPackageVersion }}' | ||
installNuget: false | ||
displayName: 'Generate NuGet package AKV Provider' | ||
displayName: 'Create AKV NuGet Package' | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Artifact: Artifacts' | ||
- task: PublishPipelineArtifact@1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
displayName: 'Publish Pipeline Artifact' | ||
inputs: | ||
PathtoPublish: $(packagePath) | ||
ArtifactName: ${{ parameters.artifactName }} | ||
targetPath: $(packagePath) | ||
artifactName: ${{ parameters.mdsArtifactName }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI runs that use the
MSBuild@1
task perform an implicit clean, which would delete the pipeline artifacts we download. So I removed packages/ from clean.