Skip to content

Commit dec0dda

Browse files
committed
Address Copilot review: declare signingKeyArg conditionally, remove dead code
1 parent 4520830 commit dec0dda

1 file changed

Lines changed: 9 additions & 16 deletions

File tree

eng/pipelines/ci/package/sqlclient-package.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,17 @@ parameters:
8484
- diagnostic
8585

8686
variables:
87-
# Disable codesign validation injection for CI builds.
88-
#
89-
# TODO: Should we enable this for internal/main since those builds produce signed assemblies?
90-
#- name: runCodesignValidationInjection
91-
# value: false
92-
9387
# Whether this is an internal (ADO.Net project) or public (Public project) build.
9488
- name: isInternalBuild
9589
value: ${{ eq(variables['System.TeamProject'], 'ADO.Net') }}
9690

97-
# Package version suffix for CI builds.
98-
- name: buildSuffix
99-
value: ci
91+
# Signing key argument passed to build.proj. On internal builds this references the secure file
92+
# downloaded by DownloadSecureFile@1; on public builds it expands to empty.
93+
- name: signingKeyArg
94+
${{ if eq(variables.isInternalBuild, 'True') }}:
95+
value: '-p:SigningKeyPath="$(keyFile.secureFilePath)"'
96+
${{ else }}:
97+
value: ''
10098

10199
jobs:
102100
- job: pack_all_packages
@@ -132,20 +130,15 @@ jobs:
132130
Write-Host 'Done.'
133131
displayName: Clean packages/ directory
134132
135-
# On internal/main, download the strong-name signing key and setup assembly signing.
133+
# On internal builds, download the strong-name signing key.
136134
- ${{ if eq(variables.isInternalBuild, 'True') }}:
137135
- task: DownloadSecureFile@1
138136
displayName: Download Signing Key
139137
inputs:
140138
secureFile: netfxKeypair.snk
141139
name: keyFile
142140

143-
- pwsh: |
144-
Write-Host "##vso[task.setvariable variable=signingKeyArg]-p:SigningKeyPath=`"$(keyFile.secureFilePath)`""
145-
displayName: Set Signing Key Argument
146-
147141
# Run the Pack target via build.proj.
148-
# On internal/main the signing key path is included via $(signingKeyArg).
149142
- task: DotNetCoreCLI@2
150143
displayName: build.proj - Pack (ReferenceType=Package)
151144
inputs:
@@ -156,7 +149,7 @@ jobs:
156149
-p:Configuration=${{ parameters.buildConfiguration }}
157150
-p:ReferenceType=Package
158151
-p:BuildNumber="$(Build.BuildNumber)"
159-
-p:BuildSuffix=$(buildSuffix)
152+
-p:BuildSuffix=ci
160153
$(signingKeyArg)
161154
-verbosity:${{ parameters.dotnetVerbosity }}
162155

0 commit comments

Comments
 (0)