Skip to content

Commit 1b8ea5a

Browse files
authored
[5.2] Eng | Add CDP_BUILD_TYPE to package validator (#2857)
1 parent 985e96d commit 1b8ea5a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ jobs:
2828
- script: SET
2929
displayName: 'Print Environment Variables'
3030

31+
- powershell: |
32+
Write-Host "##vso[task.setvariable variable=CDP_BUILD_TYPE_COPY;isOutput=true]$($env:CDP_BUILD_TYPE)"
33+
name: GetBuildType
34+
3135
- template: ../steps/build-all-configurations-signed-dlls-step.yml@self
3236

3337
- template: ../steps/code-analyze-step.yml@self

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,15 @@ jobs:
5454
- name: pathToDownloadedNuget # path to the downloaded nuget files
5555
value: $(Pipeline.Workspace)\${{parameters.packageFolderName }}
5656

57+
- name: BuildType
58+
value: $[ stageDependencies.buildMDS.build_signed_package.outputs['GetBuildType.CDP_BUILD_TYPE_COPY'] ]
59+
5760
steps:
5861
- script: SET
5962
displayName: 'Print Environment Variables'
6063

6164
- task: NuGetToolInstaller@1
62-
displayName: 'Use NuGet '
65+
displayName: 'Use NuGet'
6366

6467
- powershell: |
6568
#Sets Variables for AssemblyFileVersion, AssemblyVersion and NugetPackageVersion
@@ -111,7 +114,9 @@ jobs:
111114
displayName: 'Verify nuget signature'
112115
113116
- powershell: |
114-
if($env:CDP_BUILD_TYPE -eq 'Official')
117+
$buildType = [string]"$(BuildType)"
118+
119+
if($buildType -eq 'Official')
115120
{
116121
# Recursively find all .dll files in TempFolder (installed nuget folder)
117122
# Microsoft.Data.SqlClient.dll and Microsoft.Data.SqlClient.resources.dll (in localized folders) should have strong name

0 commit comments

Comments
 (0)