From 8057dd569178f1de072269ca222cd84e3375e180 Mon Sep 17 00:00:00 2001 From: Saransh Sharma Date: Thu, 5 Mar 2026 14:42:33 -0800 Subject: [PATCH 1/4] Prevent unrelated package signing --- eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml | 5 +++-- eng/pipelines/libraries/ci-build-variables.yml | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml b/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml index 9fb3620bf6..8e02bb21a5 100644 --- a/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml +++ b/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml @@ -98,18 +98,19 @@ jobs: - ${{ parameters.prebuildSteps }} # If we're testing in Package mode, then we must download dependent package artifacts. + # Downloads go to packages/ (local NuGet source), not $(packagePath) (build output). - ${{ if eq(parameters.referenceType, 'Package') }}: - task: DownloadPipelineArtifact@2 displayName: Download Abstractions Package Artifacts inputs: artifactName: ${{ parameters.abstractionsArtifactsName }} - targetPath: $(packagePath) + targetPath: $(Build.SourcesDirectory)/packages - task: DownloadPipelineArtifact@2 displayName: Download Logging Package Artifacts inputs: artifactName: ${{ parameters.loggingArtifactsName }} - targetPath: $(packagePath) + targetPath: $(Build.SourcesDirectory)/packages # Install the .NET SDK. - template: /eng/pipelines/steps/install-dotnet.yml@self diff --git a/eng/pipelines/libraries/ci-build-variables.yml b/eng/pipelines/libraries/ci-build-variables.yml index 6f93e5a292..dd60eaf952 100644 --- a/eng/pipelines/libraries/ci-build-variables.yml +++ b/eng/pipelines/libraries/ci-build-variables.yml @@ -62,9 +62,11 @@ variables: - name: mdsPackageVersion value: 7.0.0.$(Build.BuildNumber)-ci - # Output path for built NuGet packages + # Output path for built NuGet packages. This is intentionally separate from + # packages/ (where downloaded pipeline artifacts go) so that artifact publishing + # only uploads packages built by the current job. - name: packagePath - value: $(Build.SourcesDirectory)/packages + value: $(Build.SourcesDirectory)/output # Disable codesign validation injection for CI builds - name: runCodesignValidationInjection From b9398d55417d2ef330dc1b1242733e721ad91e82 Mon Sep 17 00:00:00 2001 From: Saransh Sharma Date: Thu, 5 Mar 2026 15:25:25 -0800 Subject: [PATCH 2/4] Define download target path --- .../common/templates/jobs/ci-build-nugets-job.yml | 6 +++--- eng/pipelines/libraries/ci-build-variables.yml | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml b/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml index 8e02bb21a5..7591591df7 100644 --- a/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml +++ b/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml @@ -98,19 +98,19 @@ jobs: - ${{ parameters.prebuildSteps }} # If we're testing in Package mode, then we must download dependent package artifacts. - # Downloads go to packages/ (local NuGet source), not $(packagePath) (build output). + # Downloads go to localFeedPath (local NuGet source), not $(packagePath) (build output). - ${{ if eq(parameters.referenceType, 'Package') }}: - task: DownloadPipelineArtifact@2 displayName: Download Abstractions Package Artifacts inputs: artifactName: ${{ parameters.abstractionsArtifactsName }} - targetPath: $(Build.SourcesDirectory)/packages + targetPath: $(localFeedPath) - task: DownloadPipelineArtifact@2 displayName: Download Logging Package Artifacts inputs: artifactName: ${{ parameters.loggingArtifactsName }} - targetPath: $(Build.SourcesDirectory)/packages + targetPath: $(localFeedPath) # Install the .NET SDK. - template: /eng/pipelines/steps/install-dotnet.yml@self diff --git a/eng/pipelines/libraries/ci-build-variables.yml b/eng/pipelines/libraries/ci-build-variables.yml index dd60eaf952..2779277678 100644 --- a/eng/pipelines/libraries/ci-build-variables.yml +++ b/eng/pipelines/libraries/ci-build-variables.yml @@ -62,9 +62,14 @@ variables: - name: mdsPackageVersion value: 7.0.0.$(Build.BuildNumber)-ci + # Local NuGet feed directory where downloaded pipeline artifacts are placed. + # NuGet.config references this as a local package source for restore. + - name: localFeedPath + value: $(Build.SourcesDirectory)/packages + # Output path for built NuGet packages. This is intentionally separate from - # packages/ (where downloaded pipeline artifacts go) so that artifact publishing - # only uploads packages built by the current job. + # localFeedPath (where downloaded pipeline artifacts go) so that artifact + # publishing only uploads packages built by the current job. - name: packagePath value: $(Build.SourcesDirectory)/output From 050ba048ecfbb64f69b8658e052283fed06a7b15 Mon Sep 17 00:00:00 2001 From: Saransh Sharma Date: Tue, 10 Mar 2026 11:25:45 -0700 Subject: [PATCH 3/4] Copy MDS nuget package --- .../common/templates/jobs/ci-build-nugets-job.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml b/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml index 7591591df7..b09e8e1555 100644 --- a/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml +++ b/eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml @@ -150,6 +150,16 @@ jobs: properties: 'AbstractionsPackageVersion=${{ parameters.abstractionsPackageVersion }};LoggingPackageVersion=${{ parameters.loggingPackageVersion }}' referenceType: ${{ parameters.referenceType }} + # When building in Package mode, the AKV restore needs to find the MDS package + # we just built. Copy it to the local NuGet feed so NuGet.config can resolve it. + - ${{ if eq(parameters.referenceType, 'Package') }}: + - task: CopyFiles@2 + displayName: Copy MDS Package to Local Feed + inputs: + sourceFolder: $(packagePath) + contents: 'Microsoft.Data.SqlClient.*.nupkg' + targetFolder: $(localFeedPath) + - template: /eng/pipelines/common/templates/steps/ci-project-build-step.yml@self parameters: platform: ${{ parameters.platform }} From f2ec39166e67ab5e8d5135b8e5df0885eff2452b Mon Sep 17 00:00:00 2001 From: Saransh Sharma Date: Tue, 10 Mar 2026 12:09:47 -0700 Subject: [PATCH 4/4] Add loggingArtifactsName parameter --- eng/pipelines/jobs/pack-azure-package-ci-job.yml | 15 ++++++++++++++- eng/pipelines/jobs/test-azure-package-ci-job.yml | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/jobs/pack-azure-package-ci-job.yml b/eng/pipelines/jobs/pack-azure-package-ci-job.yml index fc0e2a6b3d..95853d43e0 100644 --- a/eng/pipelines/jobs/pack-azure-package-ci-job.yml +++ b/eng/pipelines/jobs/pack-azure-package-ci-job.yml @@ -19,6 +19,13 @@ parameters: type: string default: Abstractions.Artifacts + # 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 Abstractions package verion to depend on. # # This is used when the referenceType is 'Package'. @@ -126,7 +133,7 @@ jobs: - pwsh: 'Get-ChildItem Env: | Sort-Object Name' displayName: '[Debug] Print Environment Variables' - # For Package reference builds, we must first download the Abstractions package artifacts. + # For Package reference builds, we must first download the dependency package artifacts. - ${{ if eq(parameters.referenceType, 'Package') }}: - task: DownloadPipelineArtifact@2 displayName: Download Abstractions Package Artifacts @@ -134,6 +141,12 @@ jobs: artifactName: ${{ parameters.abstractionsArtifactsName }} targetPath: $(Build.SourcesDirectory)/packages + - task: DownloadPipelineArtifact@2 + displayName: Download Logging Package Artifacts + inputs: + artifactName: ${{ parameters.loggingArtifactsName }} + targetPath: $(Build.SourcesDirectory)/packages + # Install the .NET SDK. - template: /eng/pipelines/steps/install-dotnet.yml@self parameters: diff --git a/eng/pipelines/jobs/test-azure-package-ci-job.yml b/eng/pipelines/jobs/test-azure-package-ci-job.yml index 13db1e9b31..53ca26366f 100644 --- a/eng/pipelines/jobs/test-azure-package-ci-job.yml +++ b/eng/pipelines/jobs/test-azure-package-ci-job.yml @@ -19,6 +19,13 @@ parameters: type: string default: Abstractions.Artifacts + # 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 Abstractions package verion to depend on. # # This is used when the referenceType is 'Package'. @@ -187,6 +194,13 @@ jobs: artifactName: ${{ parameters.abstractionsArtifactsName }} targetPath: $(Build.SourcesDirectory)/packages + # Download the Logging package artifacts into packages/. + - task: DownloadPipelineArtifact@2 + displayName: Download Logging Package Artifacts + inputs: + artifactName: ${{ parameters.loggingArtifactsName }} + targetPath: $(Build.SourcesDirectory)/packages + # Download the MDS package artifacts into packages/. # # The Azure project doesn't depend on MDS, but the test project does.